This repository was archived by the owner on Nov 19, 2024. It is now read-only.
File tree 2 files changed +5
-6
lines changed
2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -132,9 +132,8 @@ pub(crate) fn table_key<T: Table>(key: &str) -> Result<T::Key, eyre::Error> {
132
132
}
133
133
134
134
/// Get an instance of subkey for given dupsort table
135
- fn table_subkey < T : DupSort > ( subkey : & Option < String > ) -> Result < T :: SubKey , eyre:: Error > {
136
- serde_json:: from_str :: < T :: SubKey > ( & subkey. clone ( ) . unwrap_or_default ( ) )
137
- . map_err ( |e| eyre:: eyre!( e) )
135
+ fn table_subkey < T : DupSort > ( subkey : Option < & str > ) -> Result < T :: SubKey , eyre:: Error > {
136
+ serde_json:: from_str :: < T :: SubKey > ( subkey. unwrap_or_default ( ) ) . map_err ( |e| eyre:: eyre!( e) )
138
137
}
139
138
140
139
struct GetValueViewer < ' a , N : NodeTypesWithDB > {
@@ -175,7 +174,7 @@ impl<N: ProviderNodeTypes> TableViewer<()> for GetValueViewer<'_, N> {
175
174
let key = table_key :: < T > ( & self . key ) ?;
176
175
177
176
// process dupsort table
178
- let subkey = table_subkey :: < T > ( & self . subkey ) ?;
177
+ let subkey = table_subkey :: < T > ( self . subkey . as_deref ( ) ) ?;
179
178
180
179
match self . tool . get_dup :: < T > ( key, subkey) ? {
181
180
Some ( content) => {
Original file line number Diff line number Diff line change @@ -676,8 +676,8 @@ impl RpcModuleConfigBuilder {
676
676
}
677
677
678
678
/// Get a reference to the eth namespace config, if any
679
- pub const fn get_eth ( & self ) -> & Option < EthConfig > {
680
- & self . eth
679
+ pub const fn get_eth ( & self ) -> Option < & EthConfig > {
680
+ self . eth . as_ref ( )
681
681
}
682
682
683
683
/// Get a mutable reference to the eth namespace config, if any
You can’t perform that action at this time.
0 commit comments