address clippy lints

[?]
Nov 30, 2020, 8:13 PM
BZSC7VMYSFRXDHDDAMCDR6X67FN5VWIBOSE76BQLX7OCVOJFUA3AC

Dependencies

  • [2] I52XSRUH Massive cleanup, and simplification
  • [3] L4JXJHWX pijul/*: reorganize imports and remove extern crate
  • [4] UDHP4ZVB Fixing SSH asynchronicity issues
  • [5] 367UBQ6K Forwarding SSH stderr, and progress bar for push
  • [6] YDKNUL6B Add `diff --short` that lists changes without showing them
  • [7] AEPEFS7O Write help for each argument
  • [8] QE64ATLZ Fixing asynchronicity problems in SSH
  • [9] KWAMD2KR A few fixes in the documentation comments
  • [10] SEWGHUHQ .pijul/config: simplify remotes and hooks
  • [11] WZVCLZKY address clippy lints
  • [12] TZVUNELW Documentation comments
  • [13] VIHXB7SG commands: set up pager for diff, change, and credit
  • [14] SXEYMYF7 Fixing the bad changes in history (unfortunately, by rebooting).
  • [15] BAUL3WR2 Format, versions, README
  • [16] PJ7T2VFL Do not hang on locked repositories
  • [17] 3YDPHBAN address non-controversial clippy lints
  • [18] UTDZKZGP infer subcommands
  • [19] 4H2XTVJ2 Fix some mistakes in the docs
  • [20] IXWN5CYP pijul: enable colored help messages

Change contents

  • replacement in pijul-macros/src/lib.rs at line 372
    [3.13237][3.13237:13293]()
    let result = proc_macro::TokenStream::from(if rev {
    [3.13237]
    [3.13293]
    proc_macro::TokenStream::from(if rev {
  • replacement in pijul-macros/src/lib.rs at line 430
    [3.15271][3.15271:15290]()
    });
    result
    [3.15271]
    [3.15290]
    })
  • replacement in pijul/src/repository.rs at line 18
    [3.21846][3.21846:21994]()
    pub const PRISTINE_DIR: &'static str = "pristine";
    pub const CHANGES_DIR: &'static str = "changes";
    pub const CONFIG_FILE: &'static str = "config";
    [3.21846]
    [3.21994]
    pub const PRISTINE_DIR: &str = "pristine";
    pub const CHANGES_DIR: &str = "changes";
    pub const CONFIG_FILE: &str = "config";
  • replacement in pijul/src/remote/ssh.rs at line 388
    [3.4027][3.4027:4113]()
    sender.send(hashes[*current].clone()).await.unwrap();
    [3.4027]
    [3.4113]
    sender.send(hashes[*current]).await.unwrap();
  • replacement in pijul/src/main.rs at line 17
    [3.84300][3.84300:84346]()
    const DEFAULT_CHANNEL: &'static str = "main";
    [3.84300]
    [3.84346]
    const DEFAULT_CHANNEL: &str = "main";
  • replacement in pijul/src/config.rs at line 11
    [3.90005][3.90005:90047]()
    const CONFIG_DIR: &'static str = "pijul";
    [3.90005]
    [3.90047]
    const CONFIG_DIR: &str = "pijul";
  • replacement in pijul/src/commands/record.rs at line 305
    [3.111457][3.111457:111528]()
    const SYNTAX_ERROR: &'static str = "# Syntax errors, please try again.
    [3.111457]
    [3.111528]
    const SYNTAX_ERROR: &str = "# Syntax errors, please try again.
  • replacement in pijul/src/commands/file_operations.rs at line 76
    [3.170912][3.170912:170979]()
    let repo = Repository::find_root(self.repo_path.clone())?;
    [3.170912]
    [3.170979]
    let repo = Repository::find_root(self.repo_path)?;
  • replacement in pijul/src/commands/file_operations.rs at line 105
    [3.171720][3.171720:171806]()
    if p.ends_with("~") || (p.starts_with("#") && p.ends_with("#")) {
    [3.171720]
    [3.171806]
    if p.ends_with('~') || (p.starts_with('#') && p.ends_with('#')) {
  • replacement in pijul/src/commands/file_operations.rs at line 148
    [3.172955][3.172955:173041]()
    if p.ends_with("~") || (p.starts_with("#") && p.ends_with("#")) {
    [3.172955]
    [3.173041]
    if p.ends_with('~') || (p.starts_with('#') && p.ends_with('#')) {
  • replacement in pijul/src/commands/diff.rs at line 93
    [3.175893][3.175893:176894]()
    changes.entry(ch.path()).or_insert(Vec::new()).push(Status {
    operation: match ch {
    Record::FileMove { .. } => "file move",
    Record::FileDel { .. } => "file del",
    Record::FileUndel { .. } => "file undel",
    Record::SolveNameConflict { .. } => "solve name conflict",
    Record::UnsolveNameConflict { .. } => "unsolve name conflict",
    Record::FileAdd { .. } => "file add",
    Record::Edit { .. } => "edit",
    Record::Replacement { .. } => "replacement",
    Record::SolveOrderConflict { .. } => "solve order conflict",
    Record::UnsolveOrderConflict { .. } => "unsolve order conflict",
    Record::ResurrectZombies { .. } => "resurrect zombies",
    },
    line: ch.line(),
    });
    [3.175893]
    [3.176894]
    changes
    .entry(ch.path())
    .or_insert_with(Vec::new)
    .push(Status {
    operation: match ch {
    Record::FileMove { .. } => "file move",
    Record::FileDel { .. } => "file del",
    Record::FileUndel { .. } => "file undel",
    Record::SolveNameConflict { .. } => "solve name conflict",
    Record::UnsolveNameConflict { .. } => "unsolve name conflict",
    Record::FileAdd { .. } => "file add",
    Record::Edit { .. } => "edit",
    Record::Replacement { .. } => "replacement",
    Record::SolveOrderConflict { .. } => "solve order conflict",
    Record::UnsolveOrderConflict { .. } => "unsolve order conflict",
    Record::ResurrectZombies { .. } => "resurrect zombies",
    },
    line: ch.line(),
    });
  • replacement in pijul/src/commands/diff.rs at line 114
    [3.176985][3.176985:177020]()
    writeln!(stdout, "")?;
    [3.176985]
    [3.50]
    writeln!(stdout)?;
  • replacement in libpijul/src/tests/mod.rs at line 21
    [3.289730][3.289730:289795]()
    fn record_all<'env, T: MutTxnT, R: WorkingCopy, P: ChangeStore>(
    [3.289730]
    [3.289795]
    fn record_all<T: MutTxnT, R: WorkingCopy, P: ChangeStore>(
  • replacement in libpijul/src/tests/mod.rs at line 69
    [3.291162][3.291162:291259]()
    fn record_all_output<'env, T: MutTxnT, R: WorkingCopy, P: ChangeStore + Clone + Send + 'static>(
    [3.291162]
    [3.291259]
    fn record_all_output<T: MutTxnT, R: WorkingCopy, P: ChangeStore + Clone + Send + 'static>(
  • replacement in libpijul/src/tests/change.rs at line 90
    [3.448914][3.448914:448979]()
    fn record_all<'env, T: MutTxnT, R: WorkingCopy, P: ChangeStore>(
    [3.448914]
    [3.448979]
    fn record_all<T: MutTxnT, R: WorkingCopy, P: ChangeStore>(
  • replacement in libpijul/src/tests/change.rs at line 185
    [3.452346][3.452346:452417]()
    fn text_test<'env, C: ChangeStore>(c: &C, change0: &Change, h: Hash) {
    [3.452346]
    [3.452417]
    fn text_test<C: ChangeStore>(c: &C, change0: &Change, h: Hash) {
  • replacement in libpijul/src/pristine/sanakirja.rs at line 498
    [3.548208][3.548208:548302]()
    let curs = Self::cursor_dep_ref(txn.clone(), &txn.dep, Some((p, None)));
    curs
    [3.548208]
    [3.548302]
    Self::cursor_dep_ref(txn.clone(), &txn.dep, Some((p, None)))
  • replacement in libpijul/src/pristine/sanakirja.rs at line 634
    [2.36950][3.553012:553148](),[3.553012][3.553012:553148]()
    fn iter_inodes<'txn>(
    &'txn self,
    ) -> super::Cursor<Self, &'txn Self, Self::InodesCursor, Inode, Position<ChangeId>> {
    [2.36950]
    [3.553148]
    fn iter_inodes(
    &self,
    ) -> super::Cursor<Self, &Self, Self::InodesCursor, Inode, Position<ChangeId>> {
  • replacement in libpijul/src/pristine/sanakirja.rs at line 640
    [3.553221][3.553221:553267]()
    fn iter_revdep<'txn>(
    &'txn self,
    [3.553202]
    [3.553267]
    fn iter_revdep(
    &self,
  • replacement in libpijul/src/pristine/sanakirja.rs at line 643
    [3.553288][3.553288:553368]()
    ) -> super::Cursor<Self, &'txn Self, Self::DepCursor, ChangeId, ChangeId> {
    [3.553288]
    [3.553368]
    ) -> super::Cursor<Self, &Self, Self::DepCursor, ChangeId, ChangeId> {
  • replacement in libpijul/src/pristine/sanakirja.rs at line 647
    [3.553449][3.553449:553492]()
    fn iter_dep<'txn>(
    &'txn self,
    [3.553430]
    [3.553492]
    fn iter_dep(
    &self,
  • replacement in libpijul/src/pristine/sanakirja.rs at line 650
    [3.553513][3.553513:553593]()
    ) -> super::Cursor<Self, &'txn Self, Self::DepCursor, ChangeId, ChangeId> {
    [3.553513]
    [3.553593]
    ) -> super::Cursor<Self, &Self, Self::DepCursor, ChangeId, ChangeId> {
  • replacement in libpijul/src/pristine/sanakirja.rs at line 654
    [3.553671][3.553671:553718]()
    fn iter_touched<'txn>(
    &'txn self,
    [3.553652]
    [3.553718]
    fn iter_touched(
    &self,
  • replacement in libpijul/src/pristine/sanakirja.rs at line 657
    [3.553749][3.553749:553853]()
    ) -> super::Cursor<Self, &'txn Self, Self::Touched_filesCursor, Position<ChangeId>, ChangeId>
    {
    [3.553749]
    [3.553853]
    ) -> super::Cursor<Self, &Self, Self::Touched_filesCursor, Position<ChangeId>, ChangeId> {
  • replacement in libpijul/src/pristine/sanakirja.rs at line 661
    [3.553951][3.553951:554002]()
    fn iter_rev_touched<'txn>(
    &'txn self,
    [3.553932]
    [3.554002]
    fn iter_rev_touched(
    &self,
  • replacement in libpijul/src/pristine/sanakirja.rs at line 664
    [3.554023][3.554023:554125]()
    ) -> super::Cursor<Self, &'txn Self, Self::Rev_touched_filesCursor, ChangeId, Position<ChangeId>>
    [3.554023]
    [3.554125]
    ) -> super::Cursor<Self, &Self, Self::Rev_touched_filesCursor, ChangeId, Position<ChangeId>>
  • replacement in libpijul/src/pristine/sanakirja.rs at line 1102
    [3.569435][3.569435:569482]()
    self.put_remotes(commit.clone())?;
    [3.569435]
    [3.569482]
    self.put_remotes(commit)?;
  • replacement in libpijul/src/pristine/hash.rs at line 120
    [3.647883][3.647883:647910]()
    if bytes == &[0] {
    [3.647883]
    [3.647910]
    if bytes == [0] {
  • replacement in libpijul/src/path.rs at line 81
    [3.670198][3.670198:670255]()
    pub fn components<'a>(path: &'a str) -> Components<'a> {
    [3.670198]
    [3.670255]
    pub fn components(path: &str) -> Components {
  • replacement in libpijul/src/lib.rs at line 35
    [3.717927][3.717927:717971]()
    pub const DOT_DIR: &'static str = ".pijul";
    [3.717927]
    [3.717971]
    pub const DOT_DIR: &str = ".pijul";
  • replacement in libpijul/src/lib.rs at line 309
    [3.727757][3.727757:727829]()
    fn archive_with_state<'a, P: changestore::ChangeStore, A: Archive>(
    [3.727757]
    [3.727829]
    fn archive_with_state<P: changestore::ChangeStore, A: Archive>(
  • replacement in libpijul/src/lib.rs at line 379
    [3.729852][3.729852:729932]()
    fn iter_working_copy<'txn>(&'txn self) -> WorkingCopyIterator<'txn, Self> {
    [3.729852]
    [3.729932]
    fn iter_working_copy(&self) -> WorkingCopyIterator<Self> {
  • replacement in libpijul/src/lib.rs at line 479
    [3.731450][3.731450:731541]()
    fn touched_files<'txn>(&'txn self, h: pristine::Hash) -> Option<Touched<'txn, Self>> {
    [3.731450]
    [2.62123]
    fn touched_files(&self, h: pristine::Hash) -> Option<Touched<Self>> {
  • replacement in libpijul/src/lib.rs at line 540
    [3.733559][3.733559:733620]()
    fn archive<'a, C: changestore::ChangeStore, A: Archive>(
    [3.733559]
    [3.733620]
    fn archive<C: changestore::ChangeStore, A: Archive>(
  • replacement in libpijul/src/fs.rs at line 371
    [3.750130][3.750130:750247]()
    pub fn working_copy_children<'txn, T: TxnT>(
    txn: &'txn T,
    inode: Inode,
    ) -> WorkingCopyChildren<'txn, T> {
    [3.750130]
    [3.750247]
    pub fn working_copy_children<T: TxnT>(txn: &T, inode: Inode) -> WorkingCopyChildren<T> {
  • replacement in libpijul/src/fs.rs at line 424
    [3.751917][3.751917:752018]()
    pub fn iter_working_copy<'txn, T: TxnT>(txn: &'txn T, root: Inode) -> WorkingCopyIterator<'txn, T> {
    [3.751917]
    [3.752018]
    pub fn iter_working_copy<T: TxnT>(txn: &T, root: Inode) -> WorkingCopyIterator<T> {