-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
replace DisplayHardforks with Box<dyn Display> #12219
replace DisplayHardforks with Box<dyn Display> #12219
Conversation
crates/chainspec/src/api.rs
Outdated
fn display_hardforks(&self) -> DisplayHardforks { | ||
self.display_hardforks() | ||
fn display_hardforks(&self) -> Box<dyn Display> { | ||
Box::new(self.display_hardforks()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Box::new(self.display_hardforks()) | |
self.display_hardforks().boxed() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no method named boxed
for struct Box<(dyn derive_more::Display + 'static)>
.
Let me know if I should add something like pub fn boxed(self) -> Box<dyn Hardfork> { Box::new(self) }
somewhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ChainSpec::display_forks
(not the trait impl) could still return the type DisplayHardforks
which would have a boxed
method called here
Resolves #12208