mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-29 17:17:56 +00:00
address clippy & rustdoc warnings
The comment was out of date anyway, State::Live no longer takes a snapshot_path argument.
This commit is contained in:
@@ -406,7 +406,7 @@ impl<BlockHash: Hash, Key: Hash, D: MetaDb> StateDbSync<BlockHash, Key, D> {
|
||||
}
|
||||
|
||||
fn prune(&mut self, commit: &mut CommitSet<Key>) -> Result<(), Error<D::Error>> {
|
||||
if let (&mut Some(ref mut pruning), &PruningMode::Constrained(ref constraints)) =
|
||||
if let (&mut Some(ref mut pruning), PruningMode::Constrained(constraints)) =
|
||||
(&mut self.pruning, &self.mode)
|
||||
{
|
||||
loop {
|
||||
|
||||
@@ -450,7 +450,7 @@ impl Headers {
|
||||
/// and collect them on your own.
|
||||
pub fn find(&self, name: &str) -> Option<&str> {
|
||||
let raw = name.as_bytes();
|
||||
for &(ref key, ref val) in &self.raw {
|
||||
for (key, val) in &self.raw {
|
||||
if &**key == raw {
|
||||
return str::from_utf8(val).ok()
|
||||
}
|
||||
|
||||
@@ -647,7 +647,7 @@ mod tests {
|
||||
count: 1000,
|
||||
};
|
||||
let mut d = st.make();
|
||||
d.sort_by(|&(ref a, _), &(ref b, _)| a.cmp(b));
|
||||
d.sort_by(|(a, _), (b, _)| a.cmp(b));
|
||||
let dr = d.iter().map(|v| (&v.0[..], &v.1[..])).collect();
|
||||
check_input(&dr);
|
||||
}
|
||||
@@ -716,10 +716,7 @@ mod tests {
|
||||
t
|
||||
}
|
||||
|
||||
fn unpopulate_trie<'db, T: TrieConfiguration>(
|
||||
t: &mut TrieDBMut<'db, T>,
|
||||
v: &[(Vec<u8>, Vec<u8>)],
|
||||
) {
|
||||
fn unpopulate_trie<T: TrieConfiguration>(t: &mut TrieDBMut<'_, T>, v: &[(Vec<u8>, Vec<u8>)]) {
|
||||
for i in v {
|
||||
let key: &[u8] = &i.0;
|
||||
t.remove(key).unwrap();
|
||||
|
||||
@@ -599,8 +599,6 @@ pub struct LiveState {
|
||||
#[derive(Debug, Clone, clap::Subcommand)]
|
||||
pub enum State {
|
||||
/// Use a state snapshot as the source of runtime state.
|
||||
///
|
||||
/// This can be crated by passing a value to [`State::Live::snapshot_path`].
|
||||
Snap {
|
||||
#[arg(short, long)]
|
||||
snapshot_path: PathBuf,
|
||||
|
||||
Reference in New Issue
Block a user