Radish alpha
h
rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5
Radicle Heartwood Protocol & Stack
Radicle
Git
rust/edition/fmt: 2021 → 2024
Lorenz Leutgeb committed 1 month ago
commit 8bac24d6ab961dec6308fdf64b31c41201e9e8d1
parent 0494227
234 files changed +775 -680
modified .rustfmt.toml
@@ -1 +1 @@
-
edition = "2021"
+
edition = "2024"
modified crates/radicle-cli/src/commands/auth.rs
@@ -3,13 +3,13 @@ mod args;

use std::str::FromStr;

-
use anyhow::{anyhow, Context};
+
use anyhow::{Context, anyhow};

use radicle::crypto::ssh;
use radicle::crypto::ssh::Passphrase;
use radicle::node::Alias;
use radicle::profile::env;
-
use radicle::{profile, Profile};
+
use radicle::{Profile, profile};

use crate::terminal as term;

modified crates/radicle-cli/src/commands/block/args.rs
@@ -16,8 +16,8 @@ pub struct Args {

#[cfg(test)]
mod test {
-
    use clap::error::ErrorKind;
    use clap::Parser;
+
    use clap::error::ErrorKind;

    use super::Args;

modified crates/radicle-cli/src/commands/checkout.rs
@@ -3,8 +3,8 @@ mod args;

use std::path::PathBuf;

-
use anyhow::anyhow;
use anyhow::Context as _;
+
use anyhow::anyhow;

use radicle::git;
use radicle::node::AliasStore;
modified crates/radicle-cli/src/commands/clone/args.rs
@@ -2,15 +2,15 @@ use std::path::PathBuf;

use clap::Parser;

-
use radicle::identity::doc::RepoId;
use radicle::identity::IdError;
+
use radicle::identity::doc::RepoId;
use radicle::node::policy::Scope;
use radicle::prelude::*;
use radicle::storage::refs;

use crate::common_args::{
-
    SignedReferencesFeatureLevel, SignedReferencesFeatureLevelParser,
-
    ABOUT_FETCH_SIGNED_REFERENCES_FEATURE_LEVEL_MINIMUM,
+
    ABOUT_FETCH_SIGNED_REFERENCES_FEATURE_LEVEL_MINIMUM, SignedReferencesFeatureLevel,
+
    SignedReferencesFeatureLevelParser,
};
use crate::node::SyncSettings;
use crate::terminal;
modified crates/radicle-cli/src/commands/cob.rs
@@ -21,7 +21,7 @@ use crate::terminal as term;

pub use args::Args;

-
use args::{parse_many_embeds, FilteredTypeName, Format};
+
use args::{FilteredTypeName, Format, parse_many_embeds};

fn embeds(
    repo: &storage::git::Repository,
modified crates/radicle-cli/src/commands/cob/args.rs
@@ -339,8 +339,8 @@ impl std::str::FromStr for FilteredTypeName {
#[cfg(test)]
mod test {
    use super::Args;
-
    use clap::error::ErrorKind;
    use clap::Parser;
+
    use clap::error::ErrorKind;

    const ARGS: &[&str] = &[
        "--repo",
modified crates/radicle-cli/src/commands/config.rs
@@ -5,7 +5,7 @@ use args::Command;

use std::path::Path;

-
use radicle::profile::{config, Config, ConfigPath, RawConfig};
+
use radicle::profile::{Config, ConfigPath, RawConfig, config};

use crate::terminal as term;
use crate::terminal::Element as _;
modified crates/radicle-cli/src/commands/follow.rs
@@ -1,7 +1,7 @@
mod args;

-
use radicle::node::{policy, Alias, AliasStore, Handle, NodeId};
-
use radicle::{prelude::*, Node};
+
use radicle::node::{Alias, AliasStore, Handle, NodeId, policy};
+
use radicle::{Node, prelude::*};
use radicle_term::{Element as _, Paint, Table};

use crate::terminal as term;
modified crates/radicle-cli/src/commands/fork/args.rs
@@ -25,8 +25,8 @@ pub struct Args {
#[cfg(test)]
mod test {
    use super::Args;
-
    use clap::error::ErrorKind;
    use clap::Parser;
+
    use clap::error::ErrorKind;

    #[test]
    fn should_parse_rid_non_urn() {
modified crates/radicle-cli/src/commands/id.rs
@@ -2,21 +2,21 @@ mod args;

use std::collections::BTreeSet;

-
use anyhow::{anyhow, Context};
+
use anyhow::{Context, anyhow};

-
use radicle::cob::identity::{self, IdentityMut, Revision, RevisionId};
use radicle::cob::Title;
+
use radicle::cob::identity::{self, IdentityMut, Revision, RevisionId};
use radicle::identity::doc::update;
-
use radicle::identity::{doc, Doc, Identity, RawDoc};
-
use radicle::node::device::Device;
+
use radicle::identity::{Doc, Identity, RawDoc, doc};
use radicle::node::NodeId;
+
use radicle::node::device::Device;
use radicle::storage::{ReadStorage as _, WriteRepository};
-
use radicle::{cob, crypto, Profile};
+
use radicle::{Profile, cob, crypto};
use radicle_surf::diff::Diff;
use radicle_term::Element;

-
use crate::git::unified_diff::Encode as _;
use crate::git::Rev;
+
use crate::git::unified_diff::Encode as _;
use crate::terminal as term;
use crate::terminal::args::Error;
use crate::terminal::format::Author;
modified crates/radicle-cli/src/commands/id/args.rs
@@ -8,9 +8,9 @@ use serde_json as json;
use thiserror::Error;

use radicle::cob::{Title, TypeNameParse};
+
use radicle::identity::doc::PayloadId;
use radicle::identity::doc::update::EditVisibility;
use radicle::identity::doc::update::PayloadUpsert;
-
use radicle::identity::doc::PayloadId;
use radicle::prelude::{Did, RepoId};

use crate::git::Rev;
@@ -240,9 +240,9 @@ pub(super) enum Command {

#[cfg(test)]
mod test {
-
    use super::{parse_many_upserts, Args};
-
    use clap::error::ErrorKind;
+
    use super::{Args, parse_many_upserts};
    use clap::Parser;
+
    use clap::error::ErrorKind;

    #[test]
    fn should_parse_single_payload() {
modified crates/radicle-cli/src/commands/inbox.rs
@@ -9,8 +9,8 @@ use anyhow::anyhow;

use localtime::LocalTime;
use radicle::cob::TypedId;
-
use radicle::git::fmt::Qualified;
use radicle::git::BranchName;
+
use radicle::git::fmt::Qualified;
use radicle::identity::Identity;
use radicle::issue::cache::Issues as _;
use radicle::node::notifications;
@@ -18,7 +18,7 @@ use radicle::node::notifications::*;
use radicle::patch::cache::Patches as _;
use radicle::prelude::{NodeId, Profile, RepoId};
use radicle::storage::{ReadRepository, ReadStorage};
-
use radicle::{cob, git, Storage};
+
use radicle::{Storage, cob, git};

use term::Element as _;

modified crates/radicle-cli/src/commands/init.rs
@@ -10,7 +10,7 @@ use std::convert::TryFrom;
use std::env;
use std::str::FromStr;

-
use anyhow::{anyhow, bail, Context as _};
+
use anyhow::{Context as _, anyhow, bail};
use serde_json as json;

use radicle::crypto::ssh;
@@ -21,9 +21,9 @@ use radicle::git::raw::ErrorExt as _;
use radicle::identity::project::ProjectName;
use radicle::identity::{Doc, RepoId, Visibility};
use radicle::node::events::UploadPack;
-
use radicle::node::{Event, Handle, NodeId, DEFAULT_SUBSCRIBE_TIMEOUT};
+
use radicle::node::{DEFAULT_SUBSCRIBE_TIMEOUT, Event, Handle, NodeId};
use radicle::storage::ReadStorage as _;
-
use radicle::{profile, Node};
+
use radicle::{Node, profile};

use crate::commands;
use crate::git;
@@ -63,7 +63,9 @@ pub fn init(repo: git::Repository, args: Args, profile: &profile::Profile) -> an
    let default_branch = match find_default_branch(&repo) {
        Err(err @ DefaultBranchError::Head) => {
            term::error(err);
-
            term::hint("try `git checkout <default branch>` or set `git config set --local init.defaultBranch <default branch>`");
+
            term::hint(
+
                "try `git checkout <default branch>` or set `git config set --local init.defaultBranch <default branch>`",
+
            );
            anyhow::bail!("aborting `rad init`")
        }
        Err(err @ DefaultBranchError::NoHead) => {
@@ -209,7 +211,9 @@ pub fn init(repo: git::Repository, args: Args, profile: &profile::Profile) -> an
                term::warning(format!(
                    "There was an error announcing your repository to the network: {e}"
                ));
-
                term::warning("Try again with `rad sync --announce`, or check your logs with `rad node logs`.");
+
                term::warning(
+
                    "Try again with `rad sync --announce`, or check your logs with `rad node logs`.",
+
                );
                term::blank();
            }
            term::info!("To push changes, run {}.", term::format::command(push_cmd));
@@ -445,7 +449,8 @@ pub fn announce(
                term::blank();
                term::info!(
                    "You are not connected to any peers. Your repository will be announced as soon as \
-
                    your node establishes a connection with the network.");
+
                    your node establishes a connection with the network."
+
                );
                term::info!("Check for peer connections with `rad node status`.");
                term::blank();
            }
modified crates/radicle-cli/src/commands/init/args.rs
@@ -2,7 +2,7 @@ use std::path::PathBuf;

use clap::Parser;
use radicle::{
-
    identity::{project::ProjectName, Visibility},
+
    identity::{Visibility, project::ProjectName},
    node::policy::Scope,
    prelude::RepoId,
};
@@ -115,8 +115,8 @@ impl clap::builder::TypedValueParser for ScopeParser {
#[cfg(test)]
mod test {
    use super::Args;
-
    use clap::error::ErrorKind;
    use clap::Parser;
+
    use clap::error::ErrorKind;

    #[test]
    fn should_parse_rid_non_urn() {
modified crates/radicle-cli/src/commands/inspect.rs
@@ -11,15 +11,15 @@ use chrono::prelude::*;

use radicle::identity::RepoId;
use radicle::identity::{DocAt, Identity};
-
use radicle::node::policy::SeedingPolicy;
use radicle::node::AliasStore as _;
+
use radicle::node::policy::SeedingPolicy;
use radicle::storage::git::{Repository, Storage};
use radicle::storage::refs::{FeatureLevel, RefsAt, SignedRefs};
use radicle::storage::{ReadRepository, ReadStorage};

use crate::terminal as term;
-
use crate::terminal::json;
use crate::terminal::Element;
+
use crate::terminal::json;

pub use args::Args;
use args::Target;
modified crates/radicle-cli/src/commands/issue.rs
@@ -6,18 +6,18 @@ use anyhow::Context as _;

use radicle::cob::common::Label;
use radicle::cob::issue::{CloseReason, State};
-
use radicle::cob::{issue, Title};
+
use radicle::cob::{Title, issue};

+
use radicle::Profile;
use radicle::crypto;
use radicle::issue::cache::Issues as _;
-
use radicle::node::device::Device;
use radicle::node::NodeId;
+
use radicle::node::device::Device;
use radicle::prelude::Did;
use radicle::profile;
use radicle::storage;
use radicle::storage::{WriteRepository, WriteStorage};
-
use radicle::Profile;
-
use radicle::{cob, Node};
+
use radicle::{Node, cob};

pub use args::Args;
use args::{Assigned, Command, CommentAction, StateArg};
@@ -25,10 +25,10 @@ use args::{Assigned, Command, CommentAction, StateArg};
use crate::git::Rev;
use crate::node;
use crate::terminal as term;
+
use crate::terminal::Element;
use crate::terminal::args::Error;
use crate::terminal::format::Author;
use crate::terminal::issue::Format;
-
use crate::terminal::Element;

const ABOUT: &str = "Manage issues";

modified crates/radicle-cli/src/commands/issue/args.rs
@@ -4,7 +4,7 @@ use clap::{Parser, Subcommand};

use radicle::{
    cob::{Label, Reaction, Title},
-
    identity::{did::DidError, Did, RepoId},
+
    identity::{Did, RepoId, did::DidError},
    issue::{CloseReason, State},
};

modified crates/radicle-cli/src/commands/issue/cache.rs
@@ -1,9 +1,9 @@
use std::ops::ControlFlow;

+
use radicle::Profile;
use radicle::issue::IssueId;
-
use radicle::storage::git::Repository;
use radicle::storage::ReadStorage as _;
-
use radicle::Profile;
+
use radicle::storage::git::Repository;

use crate::terminal as term;

modified crates/radicle-cli/src/commands/issue/comment.rs
@@ -1,12 +1,12 @@
+
use radicle::Profile;
use radicle::cob::thread;
use radicle::storage::WriteRepository;
-
use radicle::Profile;
use radicle::{cob, git, issue, storage};

use crate::git::Rev;
use crate::terminal as term;
-
use crate::terminal::patch::Message;
use crate::terminal::Element as _;
+
use crate::terminal::patch::Message;

pub(super) fn comment(
    profile: &Profile,
modified crates/radicle-cli/src/commands/node.rs
@@ -7,11 +7,11 @@ pub mod routing;

use std::{process, time};

+
use radicle::node::Handle as _;
+
use radicle::node::Node;
use radicle::node::address::Store as AddressStore;
use radicle::node::config::ConnectAddress;
use radicle::node::routing::Store;
-
use radicle::node::Handle as _;
-
use radicle::node::Node;

use crate::commands::node::args::Only;
use crate::terminal as term;
modified crates/radicle-cli/src/commands/node/control.rs
@@ -4,14 +4,14 @@ use std::fs::File;
use std::io::{BufRead, BufReader, Read, Seek, SeekFrom, Write};
use std::{path::Path, process, thread, time};

-
use anyhow::{anyhow, Context};
+
use anyhow::{Context, anyhow};
use localtime::LocalTime;

+
use radicle::Node;
use radicle::node;
use radicle::node::{Address, ConnectResult, Handle as _, NodeId};
use radicle::profile::env::RAD_PASSPHRASE;
-
use radicle::Node;
-
use radicle::{profile, Profile};
+
use radicle::{Profile, profile};

use crate::commands::node::logs::{LogRotatorFileSystem, Rotated};
use crate::terminal as term;
modified crates/radicle-cli/src/commands/patch.rs
@@ -22,10 +22,10 @@ use std::collections::BTreeSet;
use anyhow::anyhow;

use radicle::cob::patch::PatchId;
-
use radicle::cob::{patch, Label};
+
use radicle::cob::{Label, patch};
use radicle::patch::cache::Patches as _;
use radicle::storage::git::transport;
-
use radicle::{prelude::*, Node};
+
use radicle::{Node, prelude::*};

use crate::git::Rev;
use crate::node;
modified crates/radicle-cli/src/commands/patch/cache.rs
@@ -1,9 +1,9 @@
use std::ops::ControlFlow;

+
use radicle::Profile;
use radicle::patch::PatchId;
-
use radicle::storage::git::Repository;
use radicle::storage::ReadStorage as _;
-
use radicle::Profile;
+
use radicle::storage::git::Repository;

use crate::terminal as term;

modified crates/radicle-cli/src/commands/patch/checkout.rs
@@ -5,10 +5,10 @@ use radicle::cob::patch::RevisionId;
use radicle::git::fmt::Qualified;
use radicle::git::fmt::RefString;
use radicle::git::raw::ErrorExt as _;
-
use radicle::patch::cache::Patches as _;
use radicle::patch::PatchId;
+
use radicle::patch::cache::Patches as _;
use radicle::storage::git::Repository;
-
use radicle::{git, rad, Profile};
+
use radicle::{Profile, git, rad};

use crate::terminal as term;

modified crates/radicle-cli/src/commands/patch/comment/edit.rs
@@ -1,12 +1,12 @@
use anyhow::anyhow;

+
use radicle::Profile;
use radicle::cob;
use radicle::cob::patch;
use radicle::cob::thread;
-
use radicle::patch::cache::Patches as _;
use radicle::patch::ByRevision;
+
use radicle::patch::cache::Patches as _;
use radicle::storage::git::Repository;
-
use radicle::Profile;

use crate::git;
use crate::terminal as term;
modified crates/radicle-cli/src/commands/patch/comment/react.rs
@@ -1,13 +1,13 @@
use anyhow::anyhow;

+
use radicle::Profile;
use radicle::cob;
+
use radicle::cob::Reaction;
use radicle::cob::patch;
use radicle::cob::thread;
-
use radicle::cob::Reaction;
-
use radicle::patch::cache::Patches as _;
use radicle::patch::ByRevision;
+
use radicle::patch::cache::Patches as _;
use radicle::storage::git::Repository;
-
use radicle::Profile;

use crate::git;
use crate::terminal as term;
modified crates/radicle-cli/src/commands/patch/comment/redact.rs
@@ -1,12 +1,12 @@
use anyhow::anyhow;

+
use radicle::Profile;
use radicle::cob;
use radicle::cob::patch;
use radicle::cob::thread;
-
use radicle::patch::cache::Patches as _;
use radicle::patch::ByRevision;
+
use radicle::patch::cache::Patches as _;
use radicle::storage::git::Repository;
-
use radicle::Profile;

use crate::git;
use crate::terminal as term;
modified crates/radicle-cli/src/commands/patch/edit.rs
@@ -1,8 +1,8 @@
use super::*;

use radicle::cob;
-
use radicle::cob::patch;
use radicle::cob::Title;
+
use radicle::cob::patch;
use radicle::crypto;
use radicle::node::device::Device;
use radicle::prelude::*;
modified crates/radicle-cli/src/commands/patch/list.rs
@@ -7,9 +7,9 @@ use radicle::prelude::*;
use radicle::profile::Profile;
use radicle::storage::git::Repository;

+
use term::Element as _;
use term::format::Author;
use term::table::{Table, TableOptions};
-
use term::Element as _;

use crate::terminal as term;
use crate::terminal::patch as common;
modified crates/radicle-cli/src/commands/patch/react.rs
@@ -1,11 +1,11 @@
use anyhow::anyhow;

+
use radicle::Profile;
use radicle::cob;
-
use radicle::cob::{patch, Reaction};
-
use radicle::patch::cache::Patches as _;
+
use radicle::cob::{Reaction, patch};
use radicle::patch::ByRevision;
+
use radicle::patch::cache::Patches as _;
use radicle::storage::git::Repository;
-
use radicle::Profile;

use crate::git;
use crate::terminal as term;
modified crates/radicle-cli/src/commands/patch/resolve.rs
@@ -1,9 +1,9 @@
use anyhow::anyhow;
+
use radicle::Profile;
use radicle::cob::thread::CommentId;
use radicle::patch::{self, PatchId};
-
use radicle::patch::{cache::Patches as _, ReviewId};
+
use radicle::patch::{ReviewId, cache::Patches as _};
use radicle::storage::git::Repository;
-
use radicle::Profile;

use crate::terminal as term;

modified crates/radicle-cli/src/commands/patch/review.rs
@@ -1,6 +1,6 @@
mod builder;

-
use anyhow::{anyhow, Context};
+
use anyhow::{Context, anyhow};

use radicle::cob::patch::{PatchId, RevisionId, Verdict};
use radicle::git;
modified crates/radicle-cli/src/commands/patch/review/builder.rs
@@ -26,7 +26,7 @@ use radicle::git;
use radicle::git::Oid;
use radicle::node::device::Device;
use radicle::prelude::*;
-
use radicle::storage::git::{cob::DraftStore, Repository};
+
use radicle::storage::git::{Repository, cob::DraftStore};
use radicle_surf::diff::*;
use radicle_term::{Element, VStack};

modified crates/radicle-cli/src/commands/publish.rs
@@ -1,6 +1,6 @@
mod args;

-
use anyhow::{anyhow, Context as _};
+
use anyhow::{Context as _, anyhow};

use radicle::cob;
use radicle::identity::{Identity, Visibility};
modified crates/radicle-cli/src/commands/publish/args.rs
@@ -27,8 +27,8 @@ pub struct Args {
#[cfg(test)]
mod test {
    use super::Args;
-
    use clap::error::ErrorKind;
    use clap::Parser;
+
    use clap::error::ErrorKind;

    #[test]
    fn should_parse_rid_non_urn() {
modified crates/radicle-cli/src/commands/remote/add.rs
@@ -1,9 +1,9 @@
use std::str::FromStr;

+
use radicle::Profile;
use radicle::git;
use radicle::git::fmt::RefString;
use radicle::prelude::*;
-
use radicle::Profile;
use radicle_crypto::PublicKey;

use crate::commands::checkout;
modified crates/radicle-cli/src/commands/remote/list.rs
@@ -1,10 +1,10 @@
use std::collections::HashSet;

+
use radicle::Profile;
use radicle::git::Url;
use radicle::identity::{Did, RepoId};
use radicle::node::{Alias, AliasStore as _, NodeId};
use radicle::storage::ReadStorage as _;
-
use radicle::Profile;
use radicle_term::{Element, Table};

use crate::git;
modified crates/radicle-cli/src/commands/seed.rs
@@ -1,9 +1,9 @@
mod args;

+
use radicle::node::Handle;
use radicle::node::policy;
use radicle::node::policy::{Policy, Scope};
-
use radicle::node::Handle;
-
use radicle::{prelude::*, Node};
+
use radicle::{Node, prelude::*};
use radicle_term::Element as _;

use crate::commands::sync;
modified crates/radicle-cli/src/commands/sync.rs
@@ -5,13 +5,13 @@ use std::collections::BTreeMap;
use std::collections::HashSet;
use std::time;

-
use anyhow::{anyhow, Context as _};
+
use anyhow::{Context as _, anyhow};

use radicle::node;
+
use radicle::node::SyncedAt;
use radicle::node::address::Store;
use radicle::node::sync;
use radicle::node::sync::fetch::SuccessfulOutcome;
-
use radicle::node::SyncedAt;
use radicle::node::{AliasStore, Handle as _, Node, Seed, SyncStatus};
use radicle::prelude::{NodeId, Profile, RepoId};
use radicle::storage::ReadRepository;
modified crates/radicle-cli/src/commands/sync/args.rs
@@ -4,14 +4,14 @@ use std::time;
use clap::{Parser, Subcommand, ValueEnum};

use radicle::{
-
    node::{sync, NodeId},
+
    node::{NodeId, sync},
    prelude::RepoId,
    storage::refs,
};

use crate::common_args::{
-
    SignedReferencesFeatureLevel, SignedReferencesFeatureLevelParser,
-
    ABOUT_FETCH_SIGNED_REFERENCES_FEATURE_LEVEL_MINIMUM,
+
    ABOUT_FETCH_SIGNED_REFERENCES_FEATURE_LEVEL_MINIMUM, SignedReferencesFeatureLevel,
+
    SignedReferencesFeatureLevelParser,
};
use crate::node::SyncSettings;

modified crates/radicle-cli/src/commands/unseed.rs
@@ -1,6 +1,6 @@
pub mod args;

-
use radicle::{prelude::*, Node};
+
use radicle::{Node, prelude::*};

use crate::terminal as term;

modified crates/radicle-cli/src/commands/watch.rs
@@ -2,7 +2,7 @@ mod args;

use std::{thread, time};

-
use anyhow::{anyhow, Context as _};
+
use anyhow::{Context as _, anyhow};

use radicle::git;
use radicle::git::raw::ErrorExt as _;
modified crates/radicle-cli/src/git.rs
@@ -14,21 +14,21 @@ use std::path::{Path, PathBuf};
use std::process::Command;
use std::str::FromStr;

-
use anyhow::anyhow;
use anyhow::Context as _;
+
use anyhow::anyhow;
use thiserror::Error;

use radicle::crypto::ssh;
use radicle::git;
-
use radicle::git::{Version, VERSION_REQUIRED};
+
use radicle::git::{VERSION_REQUIRED, Version};
use radicle::prelude::{NodeId, RepoId};
use radicle::storage::git::transport;

pub use radicle::git::Oid;

pub use radicle::git::raw::{
-
    build::CheckoutBuilder, AnnotatedCommit, Commit, Direction, ErrorCode, ErrorExt as _,
-
    MergeAnalysis, MergeOptions, Reference, Repository, Signature,
+
    AnnotatedCommit, Commit, Direction, ErrorCode, ErrorExt as _, MergeAnalysis, MergeOptions,
+
    Reference, Repository, Signature, build::CheckoutBuilder,
};

pub const CONFIG_COMMIT_GPG_SIGN: &str = "commit.gpgsign";
modified crates/radicle-cli/src/git/ddiff.rs
@@ -305,7 +305,7 @@ impl unified_diff::Decode for DiffModification {
            (v1, v2) => {
                return Err(unified_diff::Error::syntax(format!(
                    "indicator character expected, but got '{v1}{v2}'"
-
                )))
+
                )));
            }
        };

modified crates/radicle-cli/src/git/pretty_diff.rs
@@ -7,8 +7,8 @@ use radicle_surf::diff;
use radicle_surf::diff::{Added, Copied, Deleted, FileStats, Hunks, Modified, Moved};
use radicle_surf::diff::{Diff, DiffContent, FileDiff, Hunk, Modification};
use radicle_term as term;
-
use term::cell::Cell;
use term::VStack;
+
use term::cell::Cell;

use crate::git::unified_diff::FileHeader;
use crate::terminal::highlight::{Highlighter, Theme};
modified crates/radicle-cli/src/git/unified_diff.rs
@@ -533,7 +533,7 @@ impl Decode for Modification {
            Some(c) => {
                return Err(Error::syntax(format!(
                    "indicator character expected, but got '{c}'",
-
                )))
+
                )));
            }
            None => return Err(Error::UnexpectedEof),
        };
modified crates/radicle-cli/src/main.rs
@@ -5,8 +5,8 @@ use std::io::Write;
use std::{io::ErrorKind, process};

use anyhow::anyhow;
-
use clap::builder::styling::AnsiColor;
use clap::builder::Styles;
+
use clap::builder::styling::AnsiColor;
use clap::{CommandFactory as _, Parser, Subcommand};

use radicle::version::Version;
modified crates/radicle-cli/src/node.rs
@@ -4,7 +4,7 @@ use std::io::Write;

use radicle::node::sync;
use radicle::node::{Handle as _, NodeId};
-
use radicle::storage::{refs, ReadRepository, RepositoryError};
+
use radicle::storage::{ReadRepository, RepositoryError, refs};
use radicle::{Node, Profile};

use crate::terminal as term;
@@ -136,7 +136,9 @@ pub fn announce<R: ReadRepository>(
    match announce_(repo, settings, reporting, node, profile) {
        Ok(result) => Ok(result),
        Err(e) if e.is_connection_err() => {
-
            term::hint("Node is stopped. To announce changes to the network, start it with `rad node start`.");
+
            term::hint(
+
                "Node is stopped. To announce changes to the network, start it with `rad node start`.",
+
            );
            Ok(None)
        }
        Err(e) => Err(e),
modified crates/radicle-cli/src/terminal/args.rs
@@ -32,7 +32,9 @@ pub(crate) enum BlockTarget {
}

#[derive(Debug, Error)]
-
#[error("invalid repository or node specified (RID parsing failed with: '{repo}', NID parsing failed with: '{node}'))")]
+
#[error(
+
    "invalid repository or node specified (RID parsing failed with: '{repo}', NID parsing failed with: '{node}'))"
+
)]
pub(crate) struct BlockTargetParseError {
    repo: radicle::identity::IdError,
    node: radicle::crypto::PublicKeyError,
@@ -62,7 +64,9 @@ impl std::fmt::Display for BlockTarget {
}

#[derive(Debug, thiserror::Error)]
-
#[error("invalid Node ID specified (Node ID parsing failed with: '{nid}', DID parsing failed with: '{did}'))")]
+
#[error(
+
    "invalid Node ID specified (Node ID parsing failed with: '{nid}', DID parsing failed with: '{did}'))"
+
)]
pub(crate) struct NodeIdParseError {
    did: radicle::identity::did::DidError,
    nid: radicle::crypto::PublicKeyError,
modified crates/radicle-cli/src/terminal/cob.rs
@@ -1,4 +1,5 @@
use radicle::{
+
    Profile,
    cob::{
        self,
        cache::{MigrateCallback, MigrateProgress},
@@ -6,7 +7,6 @@ use radicle::{
    prelude::NodeId,
    profile,
    storage::ReadRepository,
-
    Profile,
};
use radicle_term as term;

modified crates/radicle-cli/src/terminal/comment.rs
@@ -1,5 +1,5 @@
-
use radicle::cob::thread::{Comment, CommentId};
use radicle::Profile;
+
use radicle::cob::thread::{Comment, CommentId};

use crate::terminal as term;
use crate::terminal::format::Author;
modified crates/radicle-cli/src/terminal/format.rs
@@ -3,14 +3,14 @@ use std::fmt;
use localtime::LocalTime;

pub use radicle_term::format::*;
-
pub use radicle_term::{style, Paint};
+
pub use radicle_term::{Paint, style};

use radicle::cob::ObjectId;
use radicle::identity::Visibility;
use radicle::node::policy::Policy;
use radicle::node::{Alias, AliasStore, NodeId};
use radicle::prelude::Did;
-
use radicle::profile::{env, Profile};
+
use radicle::profile::{Profile, env};
use radicle::storage::RefUpdate;
use radicle_term::element::Line;

modified crates/radicle-cli/src/terminal/io.rs
@@ -1,12 +1,12 @@
use anyhow::anyhow;
+
use radicle::cob::Reaction;
use radicle::cob::issue::Issue;
use radicle::cob::thread::{Comment, CommentId};
-
use radicle::cob::Reaction;
-
use radicle::crypto::ssh::keystore::MemorySigner;
use radicle::crypto::ssh::Keystore;
+
use radicle::crypto::ssh::keystore::MemorySigner;
use radicle::node::device::{BoxedDevice, Device};
-
use radicle::profile::env::RAD_PASSPHRASE;
use radicle::profile::Profile;
+
use radicle::profile::env::RAD_PASSPHRASE;

pub use radicle_term::io::*;
pub use radicle_term::spinner;
modified crates/radicle-cli/src/terminal/issue.rs
@@ -3,14 +3,14 @@ use std::io;
use radicle_term::table::TableOptions;
use radicle_term::{Table, VStack};

+
use radicle::Profile;
use radicle::cob;
use radicle::cob::issue;
use radicle::cob::issue::CloseReason;
-
use radicle::Profile;

use crate::terminal as term;
-
use crate::terminal::format::Author;
use crate::terminal::Element;
+
use crate::terminal::format::Author;

pub const OPEN_MSG: &str = r#"
<!--
modified crates/radicle-cli/src/terminal/patch.rs
@@ -9,13 +9,13 @@ use std::io::IsTerminal as _;
use thiserror::Error;

use radicle::cob;
-
use radicle::cob::patch;
use radicle::cob::Title;
+
use radicle::cob::patch;
use radicle::git;
use radicle::patch::{Patch, PatchId};
use radicle::prelude::Profile;
-
use radicle::storage::git::Repository;
use radicle::storage::WriteRepository as _;
+
use radicle::storage::git::Repository;

use crate::terminal as term;
use crate::terminal::Element;
modified crates/radicle-cli/src/warning.rs
@@ -1,8 +1,8 @@
use std::collections::HashMap;
use std::sync::LazyLock;

-
use radicle::node::config::ConnectAddress;
use radicle::node::Address;
+
use radicle::node::config::ConnectAddress;
use radicle::profile::Config;

static NODES_RENAMED: LazyLock<HashMap<Address, Address>> = LazyLock::new(|| {
modified crates/radicle-cli/tests/commands/clone.rs
@@ -1,10 +1,10 @@
use crate::test;
use crate::util::environment::Environment;
use radicle::node;
+
use radicle::node::UserAgent;
use radicle::node::address::Store as _;
use radicle::node::policy::Scope;
use radicle::node::routing::Store as _;
-
use radicle::node::UserAgent;
use radicle::node::{Alias, Handle as _};
use radicle::prelude::{NodeId, RepoId};
use radicle::storage::ReadStorage as _;
modified crates/radicle-cli/tests/commands/id.rs
@@ -1,9 +1,9 @@
use crate::test;
use crate::util::environment::Environment;
use crate::util::formula::formula;
-
use radicle::node::policy::Scope;
-
use radicle::node::Event;
use radicle::node::DEFAULT_TIMEOUT;
+
use radicle::node::Event;
+
use radicle::node::policy::Scope;
use radicle::node::{Alias, Handle as _};
use radicle::prelude::RepoId;
use radicle::storage::ReadStorage as _;
modified crates/radicle-cli/tests/commands/node.rs
@@ -1,9 +1,9 @@
use crate::test;
use crate::util::environment::Environment;
-
use radicle::node::address::Store as _;
-
use radicle::node::config::DefaultSeedingPolicy;
use radicle::node::Address;
use radicle::node::UserAgent;
+
use radicle::node::address::Store as _;
+
use radicle::node::config::DefaultSeedingPolicy;
use radicle::node::{Alias, Handle as _};
use radicle::test::fixtures;
use radicle_localtime::LocalTime;
modified crates/radicle-cli/tests/commands/patch.rs
@@ -1,8 +1,8 @@
use crate::test;
use crate::util::environment::Environment;
use crate::util::formula::formula;
-
use radicle::node::policy::Scope;
use radicle::node::Handle as _;
+
use radicle::node::policy::Scope;
use radicle::prelude::RepoId;
use radicle::test::fixtures;
use std::str::FromStr;
modified crates/radicle-cli/tests/commands/policy.rs
@@ -1,8 +1,8 @@
use crate::test;
use crate::util::environment::Environment;
use radicle::node;
-
use radicle::node::config::DefaultSeedingPolicy;
use radicle::node::Alias;
+
use radicle::node::config::DefaultSeedingPolicy;

#[test]
fn rad_seed_and_follow() {
modified crates/radicle-cli/tests/commands/sync.rs
@@ -1,8 +1,8 @@
use std::str::FromStr as _;

+
use radicle::node::Handle as _;
use radicle::node::config::DefaultSeedingPolicy;
use radicle::node::policy::Scope;
-
use radicle::node::Handle as _;
use radicle::prelude::RepoId;
use radicle::storage::{ReadStorage as _, RemoteRepository as _};

modified crates/radicle-cli/tests/commands/utility.rs
@@ -1,7 +1,7 @@
use std::str::FromStr as _;

-
use radicle::node::policy::Scope;
use radicle::node::DEFAULT_TIMEOUT;
+
use radicle::node::policy::Scope;
use radicle::node::{Alias, Handle as _};
use radicle::prelude::RepoId;
use radicle::profile;
@@ -36,11 +36,13 @@ fn rad_config() {
    let mut environment = Environment::new();
    let alias = Alias::new("alice");
    let profile = environment.profile_with(profile::Config {
-
        preferred_seeds: vec![radicle::node::config::seeds::RADICLE_NODE_BOOTSTRAP_IRIS
-
            .clone()
-
            .first()
-
            .unwrap()
-
            .clone()],
+
        preferred_seeds: vec![
+
            radicle::node::config::seeds::RADICLE_NODE_BOOTSTRAP_IRIS
+
                .clone()
+
                .first()
+
                .unwrap()
+
                .clone(),
+
        ],
        ..profile::Config::new(alias)
    });
    let working = tempfile::tempdir().unwrap();
modified crates/radicle-cli/tests/util/environment.rs
@@ -2,7 +2,7 @@ use std::path::PathBuf;
use std::str::FromStr;

use radicle::cob::cache::COBS_DB_FILE;
-
use radicle::crypto::ssh::{keystore::MemorySigner, Keystore};
+
use radicle::crypto::ssh::{Keystore, keystore::MemorySigner};
use radicle::crypto::{KeyPair, Seed};
use radicle::git;
use radicle::node::policy::store as policy;
@@ -47,10 +47,9 @@ pub(crate) mod config {
                },
                ..Limits::default()
            },
-
            external_addresses: vec![node::Address::from_str(&format!(
-
                "{alias}.radicle.example:8776"
-
            ))
-
            .unwrap()],
+
            external_addresses: vec![
+
                node::Address::from_str(&format!("{alias}.radicle.example:8776")).unwrap(),
+
            ],
            ..node(alias)
        }
    }
modified crates/radicle-cob/src/backend/git/change.rs
@@ -15,10 +15,10 @@ use crate::change::store::Version;
use crate::signatures;
use crate::trailers::CommitTrailer;
use crate::{
-
    change,
-
    change::{store, Contents, Entry, Timestamp},
+
    Embed, change,
+
    change::{Contents, Entry, Timestamp, store},
    signatures::{ExtendedSignature, Signatures},
-
    trailers, Embed,
+
    trailers,
};

use super::commit::Commit;
modified crates/radicle-cob/src/backend/git/commit.rs
@@ -6,9 +6,9 @@ use std::str::{self, FromStr};
use git2::{ObjectType, Oid};

use metadata::author::Author;
+
use metadata::commit::CommitData;
use metadata::commit::headers::Headers;
use metadata::commit::trailers::OwnedTrailer;
-
use metadata::commit::CommitData;

use trailers::Trailers;

modified crates/radicle-cob/src/change/store.rs
@@ -7,7 +7,7 @@ use oid::Oid;
use serde::{Deserialize, Serialize};

use crate::object::collaboration::error::{Create, Update};
-
use crate::{signatures, TypeName};
+
use crate::{TypeName, signatures};

/// Change entry storage.
pub trait Storage {
modified crates/radicle-cob/src/change_graph.rs
@@ -7,8 +7,8 @@ use dag::Dag;
use oid::Oid;

use crate::{
-
    change, object, object::collaboration::Evaluate, signatures::ExtendedSignature,
-
    CollaborativeObject, Entry, EntryId, History, ObjectId, TypeName,
+
    CollaborativeObject, Entry, EntryId, History, ObjectId, TypeName, change, object,
+
    object::collaboration::Evaluate, signatures::ExtendedSignature,
};

#[derive(Debug, thiserror::Error)]
modified crates/radicle-cob/src/lib.rs
@@ -77,8 +77,8 @@ mod change_graph;
mod trailers;

pub mod change;
-
pub use change::store::{Contents, Embed, EntryId, Manifest, Version};
pub use change::Entry;
+
pub use change::store::{Contents, Embed, EntryId, Manifest, Version};

pub mod history;
pub use history::History;
@@ -91,8 +91,8 @@ pub use type_name::TypeName;

pub mod object;
pub use object::{
-
    create, get, info, list, remove, update, CollaborativeObject, Create, Evaluate, ObjectId,
-
    Update, Updated,
+
    CollaborativeObject, Create, Evaluate, ObjectId, Update, Updated, create, get, info, list,
+
    remove, update,
};

#[cfg(test)]
modified crates/radicle-cob/src/object.rs
@@ -9,8 +9,8 @@ use thiserror::Error;

pub mod collaboration;
pub use collaboration::{
-
    create, get, info, list, parse_refstr, remove, update, CollaborativeObject, Create, Evaluate,
-
    Update, Updated,
+
    CollaborativeObject, Create, Evaluate, Update, Updated, create, get, info, list, parse_refstr,
+
    remove, update,
};

pub mod storage;
modified crates/radicle-cob/src/object/collaboration.rs
@@ -6,12 +6,12 @@ use nonempty::NonEmpty;
use oid::Oid;

use crate::change::store::{Manifest, Version};
-
use crate::{change, Entry, History, ObjectId, TypeName};
+
use crate::{Entry, History, ObjectId, TypeName, change};

pub mod error;

mod create;
-
pub use create::{create, Create};
+
pub use create::{Create, create};

mod get;
pub use get::get;
@@ -25,7 +25,7 @@ mod remove;
pub use remove::remove;

mod update;
-
pub use update::{update, Update, Updated};
+
pub use update::{Update, Updated, update};

/// A collaborative object
#[derive(Debug, Clone, PartialEq, Eq)]
modified crates/radicle-cob/src/object/collaboration/get.rs
@@ -2,7 +2,7 @@

use crypto::ssh::ExtendedSignature;

-
use crate::{change_graph::ChangeGraph, CollaborativeObject, Evaluate, ObjectId, TypeName};
+
use crate::{CollaborativeObject, Evaluate, ObjectId, TypeName, change_graph::ChangeGraph};

use super::error;

@@ -24,10 +24,10 @@ where
    T: Evaluate<S>,
    S: crate::object::Storage,
    S: crate::change::Storage<
-
        ObjectId = crate::object::Oid,
-
        Parent = crate::object::Oid,
-
        Signatures = ExtendedSignature,
-
    >,
+
            ObjectId = crate::object::Oid,
+
            Parent = crate::object::Oid,
+
            Signatures = ExtendedSignature,
+
        >,
{
    let tip_refs = storage
        .objects(typename, oid)
modified crates/radicle-cob/src/object/collaboration/info.rs
@@ -9,7 +9,7 @@ use std::collections::BTreeSet;
use crypto::ssh::ExtendedSignature;
use oid::Oid;

-
use crate::{change_graph::ChangeGraph, ObjectId, TypeName};
+
use crate::{ObjectId, TypeName, change_graph::ChangeGraph};

use super::error;

@@ -41,10 +41,10 @@ pub fn changegraph<S>(
where
    S: crate::object::Storage,
    S: crate::change::Storage<
-
        ObjectId = crate::object::Oid,
-
        Parent = crate::object::Oid,
-
        Signatures = ExtendedSignature,
-
    >,
+
            ObjectId = crate::object::Oid,
+
            Parent = crate::object::Oid,
+
            Signatures = ExtendedSignature,
+
        >,
{
    let tip_refs = storage
        .objects(typename, oid)
modified crates/radicle-cob/src/object/collaboration/list.rs
@@ -1,6 +1,6 @@
// Copyright © 2022 The Radicle Link Contributors

-
use crate::{change_graph::ChangeGraph, CollaborativeObject, Evaluate, TypeName};
+
use crate::{CollaborativeObject, Evaluate, TypeName, change_graph::ChangeGraph};

use super::error;

@@ -19,10 +19,10 @@ where
    T: Evaluate<S>,
    S: crate::object::Storage,
    S: crate::change::Storage<
-
        ObjectId = crate::object::Oid,
-
        Parent = crate::object::Oid,
-
        Signatures = crate::ExtendedSignature,
-
    >,
+
            ObjectId = crate::object::Oid,
+
            Parent = crate::object::Oid,
+
            Signatures = crate::ExtendedSignature,
+
        >,
{
    let references = storage
        .types(typename)
modified crates/radicle-cob/src/object/collaboration/update.rs
@@ -5,8 +5,8 @@ use nonempty::NonEmpty;
use oid::Oid;

use crate::{
-
    change, change_graph::ChangeGraph, history::EntryId, CollaborativeObject, Embed, Evaluate,
-
    ExtendedSignature, ObjectId, TypeName,
+
    CollaborativeObject, Embed, Evaluate, ExtendedSignature, ObjectId, TypeName, change,
+
    change_graph::ChangeGraph, history::EntryId,
};

use super::error;
modified crates/radicle-cob/src/signatures.rs
@@ -7,10 +7,10 @@ use std::{
    ops::{Deref, DerefMut},
};

-
use crypto::{ssh, PublicKey};
+
use crypto::{PublicKey, ssh};
use metadata::commit::{
-
    headers::Signature::{Pgp, Ssh},
    CommitData,
+
    headers::Signature::{Pgp, Ssh},
};

pub use ssh::ExtendedSignature;
modified crates/radicle-cob/src/test/storage.rs
@@ -6,9 +6,9 @@ use fmt::Component;
use tempfile::TempDir;

use crate::{
-
    change,
+
    ObjectId, Store, change,
    object::{self, Reference},
-
    signatures, ObjectId, Store,
+
    signatures,
};

pub mod error {
modified crates/radicle-cob/src/tests.rs
@@ -2,7 +2,7 @@ use fmt::{Component, RefString};

use radicle_git_ref_format::refname;

-
use crate::{object, test::arbitrary::Invalid, ObjectId, TypeName};
+
use crate::{ObjectId, TypeName, object, test::arbitrary::Invalid};

#[cfg(feature = "git2")]
mod git {
@@ -10,11 +10,11 @@ mod git {

    use crypto::test::signer::MockSigner;
    use crypto::{PublicKey, Signer};
-
    use nonempty::{nonempty, NonEmpty};
+
    use nonempty::{NonEmpty, nonempty};
    use qcheck::Arbitrary;

    use crate::{
-
        create, get, list, update, Create, Entry, ObjectId, TypeName, Update, Updated, Version,
+
        Create, Entry, ObjectId, TypeName, Update, Updated, Version, create, get, list, update,
    };

    use crate::test;
modified crates/radicle-cob/src/type_name.rs
@@ -116,15 +116,19 @@ mod test {
        assert!(TypeName::from_str("abc..ghi").is_err());
        assert!(TypeName::from_str("abc.-123.ghi").is_err());
        assert!(TypeName::from_str("abc.123-.ghi").is_err());
-
        assert!(TypeName::from_str(&format!(
-
            "a.very.long.name.that.exceeds.the.two-hundred-and-fifty-five.length.limit.{}",
-
            "a".repeat(255)
-
        ))
-
        .is_err());
-
        assert!(TypeName::from_str(&format!(
-
            "component.exceeds.sixty-three.limit.{}",
-
            "a".repeat(64)
-
        ))
-
        .is_err());
+
        assert!(
+
            TypeName::from_str(&format!(
+
                "a.very.long.name.that.exceeds.the.two-hundred-and-fifty-five.length.limit.{}",
+
                "a".repeat(255)
+
            ))
+
            .is_err()
+
        );
+
        assert!(
+
            TypeName::from_str(&format!(
+
                "component.exceeds.sixty-three.limit.{}",
+
                "a".repeat(64)
+
            ))
+
            .is_err()
+
        );
    }
}
modified crates/radicle-core/src/repo.rs
@@ -219,7 +219,7 @@ mod radicle_git_ref_format_impls {
mod serde_impls {
    use alloc::string::String;

-
    use serde::{de, Deserialize, Deserializer, Serialize};
+
    use serde::{Deserialize, Deserializer, Serialize, de};

    use super::RepoId;

@@ -347,48 +347,72 @@ mod test {
    fn invalid() {
        assert!("".parse::<RepoId>().is_err());
        assert!("not-a-valid-rid".parse::<RepoId>().is_err());
-
        assert!("xyz:z3gqcJUoA1n9HaHKufZs5FCSGazv5"
-
            .parse::<RepoId>()
-
            .is_err());
-
        assert!("RAD:z3gqcJUoA1n9HaHKufZs5FCSGazv5"
-
            .parse::<RepoId>()
-
            .is_err());
+
        assert!(
+
            "xyz:z3gqcJUoA1n9HaHKufZs5FCSGazv5"
+
                .parse::<RepoId>()
+
                .is_err()
+
        );
+
        assert!(
+
            "RAD:z3gqcJUoA1n9HaHKufZs5FCSGazv5"
+
                .parse::<RepoId>()
+
                .is_err()
+
        );
        assert!("rad:".parse::<RepoId>().is_err());
-
        assert!("rad:z3gqcJUoA1n9HaHKufZs5FCSG0zv5"
-
            .parse::<RepoId>()
-
            .is_err());
-
        assert!("rad:z3gqcJUoA1n9HaHKufZs5FCSGOzv5"
-
            .parse::<RepoId>()
-
            .is_err());
-
        assert!("rad:z3gqcJUoA1n9HaHKufZs5FCSGIzv5"
-
            .parse::<RepoId>()
-
            .is_err());
-
        assert!("rad:z3gqcJUoA1n9HaHKufZs5FCSGlzv5"
-
            .parse::<RepoId>()
-
            .is_err());
-
        assert!("rad:z3gqcJUoA1n9HaHKufZs5FCSGázv5"
-
            .parse::<RepoId>()
-
            .is_err());
-
        assert!("rad:z3gqcJUoA1n9HaHKufZs5FCSG@zv5"
-
            .parse::<RepoId>()
-
            .is_err());
-
        assert!("rad:Z3gqcJUoA1n9HaHKufZs5FCSGazv5"
-
            .parse::<RepoId>()
-
            .is_err());
+
        assert!(
+
            "rad:z3gqcJUoA1n9HaHKufZs5FCSG0zv5"
+
                .parse::<RepoId>()
+
                .is_err()
+
        );
+
        assert!(
+
            "rad:z3gqcJUoA1n9HaHKufZs5FCSGOzv5"
+
                .parse::<RepoId>()
+
                .is_err()
+
        );
+
        assert!(
+
            "rad:z3gqcJUoA1n9HaHKufZs5FCSGIzv5"
+
                .parse::<RepoId>()
+
                .is_err()
+
        );
+
        assert!(
+
            "rad:z3gqcJUoA1n9HaHKufZs5FCSGlzv5"
+
                .parse::<RepoId>()
+
                .is_err()
+
        );
+
        assert!(
+
            "rad:z3gqcJUoA1n9HaHKufZs5FCSGázv5"
+
                .parse::<RepoId>()
+
                .is_err()
+
        );
+
        assert!(
+
            "rad:z3gqcJUoA1n9HaHKufZs5FCSG@zv5"
+
                .parse::<RepoId>()
+
                .is_err()
+
        );
+
        assert!(
+
            "rad:Z3gqcJUoA1n9HaHKufZs5FCSGazv5"
+
                .parse::<RepoId>()
+
                .is_err()
+
        );
        assert!("rad:z3gqcJUoA1n9HaHKuf".parse::<RepoId>().is_err());
-
        assert!("rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5abcdef"
-
            .parse::<RepoId>()
-
            .is_err());
-
        assert!("rad: z3gqcJUoA1n9HaHKufZs5FCSGazv5"
-
            .parse::<RepoId>()
-
            .is_err());
+
        assert!(
+
            "rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5abcdef"
+
                .parse::<RepoId>()
+
                .is_err()
+
        );
+
        assert!(
+
            "rad: z3gqcJUoA1n9HaHKufZs5FCSGazv5"
+
                .parse::<RepoId>()
+
                .is_err()
+
        );
    }

    #[test]
    fn valid() {
-
        assert!("rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5"
-
            .parse::<RepoId>()
-
            .is_ok());
+
        assert!(
+
            "rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5"
+
                .parse::<RepoId>()
+
                .is_ok()
+
        );
        assert!("z3gqcJUoA1n9HaHKufZs5FCSGazv5".parse::<RepoId>().is_ok());
        assert!("z3XncAdkZjeK9mQS5Sdc4qhw98BUX".parse::<RepoId>().is_ok());
    }
modified crates/radicle-crypto/src/lib.rs
@@ -6,7 +6,7 @@ use ec25519 as ed25519;
use serde::{Deserialize, Serialize};
use thiserror::Error;

-
pub use ed25519::{edwards25519, Error, KeyPair, Seed};
+
pub use ed25519::{Error, KeyPair, Seed, edwards25519};

pub extern crate signature;

modified crates/radicle-crypto/src/test/arbitrary.rs
@@ -1,6 +1,6 @@
use qcheck::Arbitrary;

-
use crate::{test::signer::MockSigner, KeyPair, PublicKey, SecretKey, Seed};
+
use crate::{KeyPair, PublicKey, SecretKey, Seed, test::signer::MockSigner};

impl Arbitrary for MockSigner {
    fn arbitrary(g: &mut qcheck::Gen) -> Self {
modified crates/radicle-crypto/src/test/signer.rs
@@ -1,4 +1,4 @@
-
use crate::{ssh::ExtendedSignature, KeyPair, PublicKey, SecretKey, Seed, Signature};
+
use crate::{KeyPair, PublicKey, SecretKey, Seed, Signature, ssh::ExtendedSignature};

#[derive(Debug, Clone)]
pub struct MockSigner {
modified crates/radicle-fetch/src/git/mem.rs
@@ -1,7 +1,7 @@
use std::collections::HashMap;

-
use radicle::git::fmt::{Component, Qualified, RefString};
use radicle::git::Oid;
+
use radicle::git::fmt::{Component, Qualified, RefString};
use radicle::prelude::PublicKey;

use super::refs::{Applied, RefUpdate, Update};
modified crates/radicle-fetch/src/git/refs/update.rs
@@ -18,8 +18,8 @@
use std::collections::BTreeMap;

use either::Either;
-
use radicle::git::fmt::{Namespaced, Qualified};
use radicle::git::Oid;
+
use radicle::git::fmt::{Namespaced, Qualified};
use radicle::prelude::PublicKey;

pub use radicle::storage::RefUpdate;
modified crates/radicle-fetch/src/git/repository.rs
@@ -3,9 +3,8 @@ pub mod error;
use either::Either;
use radicle::git::raw::ErrorExt as _;
use radicle::git::{
-
    self,
+
    self, Oid,
    fmt::{Namespaced, Qualified},
-
    Oid,
};
use radicle::storage::git::Repository;

modified crates/radicle-fetch/src/git/repository/error.rs
@@ -1,7 +1,6 @@
use radicle::git::{
-
    self,
+
    self, Oid,
    fmt::{Namespaced, Qualified},
-
    Oid,
};
use thiserror::Error;

modified crates/radicle-fetch/src/handle.rs
@@ -1,12 +1,12 @@
-
use std::sync::atomic::{self, AtomicBool};
use std::sync::Arc;
+
use std::sync::atomic::{self, AtomicBool};

use bstr::BString;
use radicle::crypto::PublicKey;
use radicle::git::Oid;
use radicle::identity::{Doc, DocError};
-
use radicle::storage::git::Repository;
use radicle::storage::ReadRepository;
+
use radicle::storage::git::Repository;

use crate::policy::{Allowed, BlockList};
use crate::transport::{ConnectionStream, Transport};
modified crates/radicle-fetch/src/lib.rs
@@ -12,9 +12,9 @@ mod state;
use std::io;
use std::time::Instant;

-
use gix_protocol::{handshake, Handshake};
+
use gix_protocol::{Handshake, handshake};

-
pub use gix_protocol::{transport::bstr::ByteSlice, RemoteProgress};
+
pub use gix_protocol::{RemoteProgress, transport::bstr::ByteSlice};
pub use handle::Handle;
pub use policy::{Allowed, BlockList, Scope};
use radicle::storage::git::Repository;
@@ -22,8 +22,8 @@ pub use state::{Config, FetchLimit, FetchResult};
pub use transport::Transport;

use radicle::crypto::PublicKey;
-
use radicle::storage::refs::RefsAt;
use radicle::storage::ReadRepository as _;
+
use radicle::storage::refs::RefsAt;
use state::FetchState;
use thiserror::Error;

modified crates/radicle-fetch/src/refs.rs
@@ -2,9 +2,8 @@ use bstr::{BString, ByteSlice};
use either::Either;
use radicle::crypto::PublicKey;
use radicle::git::{
-
    self,
+
    self, Oid,
    fmt::{Component, Namespaced, Qualified},
-
    Oid,
};
use thiserror::Error;

modified crates/radicle-fetch/src/sigrefs.rs
@@ -2,7 +2,7 @@ use std::collections::BTreeMap;
use std::ops::Not as _;

pub use radicle::storage::refs::SignedRefs;
-
pub use radicle::storage::{git::Validation, Validations};
+
pub use radicle::storage::{Validations, git::Validation};
use radicle::{crypto::PublicKey, storage::ValidateRepository};

pub mod error {
modified crates/radicle-fetch/src/stage.rs
@@ -37,10 +37,10 @@ use either::Either;
use gix_protocol::handshake::Ref;
use nonempty::NonEmpty;
use radicle::crypto::PublicKey;
-
use radicle::git::fmt::{refname, Component, Namespaced, Qualified};
+
use radicle::git::fmt::{Component, Namespaced, Qualified, refname};
+
use radicle::storage::ReadRepository;
use radicle::storage::git::Repository;
use radicle::storage::refs::{RefsAt, Special};
-
use radicle::storage::ReadRepository;

use crate::git::refs::{Policy, Update, Updates};
use crate::policy::BlockList;
modified crates/radicle-fetch/src/state.rs
@@ -3,14 +3,14 @@ use std::time::Instant;

use gix_protocol::Handshake;
use radicle::crypto::PublicKey;
-
use radicle::git::{fmt::Qualified, Oid};
+
use radicle::git::{Oid, fmt::Qualified};
use radicle::identity::{Did, Doc, DocError};

use radicle::storage;
use radicle::storage::git::Repository;
use radicle::storage::refs::{FeatureLevel, RefsAt};
use radicle::storage::{
-
    git::Validation, Remote, RemoteId, RemoteRepository, Remotes, ValidateRepository, Validations,
+
    Remote, RemoteId, RemoteRepository, Remotes, ValidateRepository, Validations, git::Validation,
};

use crate::git;
@@ -20,7 +20,7 @@ use crate::git::repository;
use crate::sigrefs::SignedRefs;
use crate::stage;
use crate::stage::ProtocolStage;
-
use crate::{refs, sigrefs, transport, Handle};
+
use crate::{Handle, refs, sigrefs, transport};

/// The data size limit, 5Mb, while fetching the special refs,
/// i.e. `rad/id` and `rad/sigrefs`.
@@ -549,9 +549,13 @@ impl FetchState {
                        }) => {
                            let level_required = levels.max();
                            if level_reachable >= level_required {
-
                                log::info!("Non-delegate {remote} has downgraded history, currently stuck at '{actual}', expects to be upgraded to '{level_required}' and will be upgraded to '{level_reachable}'.")
+
                                log::info!(
+
                                    "Non-delegate {remote} has downgraded history, currently stuck at '{actual}', expects to be upgraded to '{level_required}' and will be upgraded to '{level_reachable}'."
+
                                )
                            } else {
-
                                log::debug!("Non-delegate {remote} has downgraded history, currently stuck at '{actual}', expects to be upgraded to '{level_required}' but only level '{level_reachable}' was advertised.");
+
                                log::debug!(
+
                                    "Non-delegate {remote} has downgraded history, currently stuck at '{actual}', expects to be upgraded to '{level_required}' but only level '{level_reachable}' was advertised."
+
                                );
                                self.prune(&remote);
                                continue;
                            }
@@ -601,9 +605,13 @@ impl FetchState {
                        }) => {
                            let level_required = levels.max();
                            if level_reachable >= level_required {
-
                                log::info!("Delegate {remote} has downgraded history, currently stuck at '{actual}', expects to be upgraded to '{level_required}' and will be upgraded to '{level_reachable}'.")
+
                                log::info!(
+
                                    "Delegate {remote} has downgraded history, currently stuck at '{actual}', expects to be upgraded to '{level_required}' and will be upgraded to '{level_reachable}'."
+
                                )
                            } else {
-
                                log::info!("Delegate {remote} has downgraded history, currently stuck at '{actual}', expects to be upgraded to '{level_required}' but only level '{level_reachable}' was advertised.");
+
                                log::info!(
+
                                    "Delegate {remote} has downgraded history, currently stuck at '{actual}', expects to be upgraded to '{level_required}' but only level '{level_reachable}' was advertised."
+
                                );
                                self.prune(&remote);
                                continue;
                            }
@@ -629,7 +637,10 @@ impl FetchState {
                    }

                    if level_reachable < FeatureLevel::LATEST {
-
                        log::warn!("Delegate {remote} is on feature level '{level_reachable}' which is lower than '{}', they should consider upgrading Radicle.", FeatureLevel::LATEST)
+
                        log::warn!(
+
                            "Delegate {remote} is on feature level '{level_reachable}' which is lower than '{}', they should consider upgrading Radicle.",
+
                            FeatureLevel::LATEST
+
                        )
                    }
                }
            }
modified crates/radicle-fetch/src/transport.rs
@@ -4,18 +4,18 @@ pub(crate) mod ls_refs;
use std::collections::BTreeSet;
use std::io;
use std::path::PathBuf;
-
use std::sync::atomic::AtomicBool;
use std::sync::Arc;
+
use std::sync::atomic::AtomicBool;

use bstr::BString;
use gix_features::progress::prodash::progress;
-
use gix_protocol::handshake;
use gix_protocol::Handshake;
-
use gix_transport::client;
+
use gix_protocol::handshake;
use gix_transport::Protocol;
use gix_transport::Service;
-
use radicle::git::fmt::Qualified;
+
use gix_transport::client;
use radicle::git::Oid;
+
use radicle::git::fmt::Qualified;
use radicle::storage::git::Repository;
use thiserror::Error;

modified crates/radicle-fetch/src/transport/fetch.rs
@@ -1,16 +1,16 @@
use std::io;
use std::path::PathBuf;
-
use std::sync::{atomic::AtomicBool, Arc};
+
use std::sync::{Arc, atomic::AtomicBool};

use gix_features::progress::{DynNestedProgress, NestedProgress};
use gix_pack as pack;
use gix_protocol::fetch::negotiate::one_round::State;
use gix_protocol::handshake::Ref;
-
use gix_protocol::{fetch, Handshake};
+
use gix_protocol::{Handshake, fetch};

use crate::git::packfile;

-
use super::{agent_name, Connection, WantsHaves};
+
use super::{Connection, WantsHaves, agent_name};

pub type Error = fetch::Error;

modified crates/radicle-fetch/src/transport/ls_refs.rs
@@ -5,12 +5,12 @@ use std::io;
use gix_features::progress::Progress;
use gix_protocol::handshake::Ref;
use gix_protocol::transport::Protocol;
-
use gix_protocol::{ls_refs, Handshake};
+
use gix_protocol::{Handshake, ls_refs};
use gix_transport::bstr::BString;

use crate::stage::RefPrefix;

-
use super::{agent_name, Connection};
+
use super::{Connection, agent_name};

/// Configuration for running an ls-refs process.
///
modified crates/radicle-git-metadata/src/commit/parse.rs
@@ -6,9 +6,9 @@ use std::borrow::Cow;
use crate::author::Author;

use super::{
+
    CommitData,
    headers::Headers,
    trailers::{OwnedTrailer, Token, Trailer},
-
    CommitData,
};

#[derive(Debug, thiserror::Error)]
modified crates/radicle-git-metadata/src/commit/parse/test/error.rs
@@ -1,4 +1,4 @@
-
use crate::commit::parse::{parse, ParseError};
+
use crate::commit::parse::{ParseError, parse};

/// Helper type whose FromStr always fails.
///
modified crates/radicle-git-metadata/src/commit/parse/test/success.rs
@@ -142,9 +142,11 @@ This line is not a valid trailer."#;

    assert_eq!(commit.trailers().count(), 0);
    assert!(commit.message().contains("Signed-off-by"));
-
    assert!(commit
-
        .message()
-
        .contains("This line is not a valid trailer."));
+
    assert!(
+
        commit
+
            .message()
+
            .contains("This line is not a valid trailer.")
+
    );
}

#[test]
modified crates/radicle-node/src/control.rs
@@ -1,7 +1,7 @@
//! Client control socket implementation.
-
use std::io::prelude::*;
use std::io::BufReader;
use std::io::LineWriter;
+
use std::io::prelude::*;
use std::path::PathBuf;
use std::{io, net, time};

@@ -283,8 +283,8 @@ mod tests {

    use super::*;
    use crate::identity::RepoId;
-
    use crate::node::policy::Scope;
    use crate::node::Handle;
+
    use crate::node::policy::Scope;
    use crate::node::{Alias, Node, NodeId};
    use crate::test;

modified crates/radicle-node/src/lib.rs
@@ -26,8 +26,8 @@ use radicle::version::Version;

pub use localtime::{LocalDuration, LocalTime};
pub use radicle::node::Link;
-
pub use radicle::node::UserAgent;
pub use radicle::node::PROTOCOL_VERSION;
+
pub use radicle::node::UserAgent;
pub use radicle::prelude::Timestamp;
pub use radicle::{collections, crypto, git, identity, node, profile, rad, storage};
pub use runtime::Runtime;
@@ -49,10 +49,10 @@ pub static USER_AGENT: LazyLock<UserAgent> = LazyLock::new(|| {
pub mod prelude {
    pub use crate::crypto::{PublicKey, Signature};
    pub use crate::identity::{Did, RepoId};
-
    pub use crate::node::{config::Network, Address, Event, NodeId};
+
    pub use crate::node::{Address, Event, NodeId, config::Network};
    pub use crate::service::filter::Filter;
    pub use crate::service::{DisconnectReason, Message};
-
    pub use crate::storage::refs::Refs;
    pub use crate::storage::WriteStorage;
+
    pub use crate::storage::refs::Refs;
    pub use crate::{LocalDuration, LocalTime, Timestamp};
}
modified crates/radicle-node/src/main.rs
@@ -141,7 +141,9 @@ fn parse_options() -> Result<Options, lexopt::Error> {
            }
            Long("log") | Long("log-level") => {
                if matches!(arg, Long("log")) {
-
                    eprintln!("Warning: The option `--log` is deprecated and will be removed. Please use `--log-level` instead.");
+
                    eprintln!(
+
                        "Warning: The option `--log` is deprecated and will be removed. Please use `--log-level` instead."
+
                    );
                }
                log_level = Some(parser.value()?.parse_with(log::Level::from_str)?);
            }
@@ -202,7 +204,9 @@ enum ExecutionError {
        path: PathBuf,
        source: radicle::crypto::ssh::keystore::Error,
    },
-
    #[error("failed to load secret key '{secret}': fingerprint of corresponding public key is different from '{fingerprint}'")]
+
    #[error(
+
        "failed to load secret key '{secret}': fingerprint of corresponding public key is different from '{fingerprint}'"
+
    )]
    FingerprintMismatch {
        secret: PathBuf,
        fingerprint: Fingerprint,
@@ -341,7 +345,7 @@ fn initialize_logging(options: &LogOptions) -> Result<(), Box<dyn std::error::Er
        match options.logger {
            #[cfg(feature = "structured-logger")]
            Logger::Structured => {
-
                use structured_logger::{json, Builder};
+
                use structured_logger::{Builder, json};

                let writer = match options.format.unwrap_or(LogFormat::Json) {
                    LogFormat::Json => json::new_writer(io::stdout()),
modified crates/radicle-node/src/reactor.rs
@@ -13,7 +13,7 @@ use std::thread::JoinHandle;
use std::time::{Duration, Instant};
use std::{io, thread};

-
use crossbeam_channel::{unbounded, Receiver, TryRecvError};
+
use crossbeam_channel::{Receiver, TryRecvError, unbounded};
use mio::event::{Event, Source};
use mio::{Events, Interest, Poll, Waker};
use thiserror::Error;
modified crates/radicle-node/src/reactor/session.rs
@@ -256,7 +256,7 @@ impl Session for TcpStream {
}

mod impl_noise {
-
    use cyphernet::encrypt::noise::{error::NoiseError as Error, NoiseState as Noise};
+
    use cyphernet::encrypt::noise::{NoiseState as Noise, error::NoiseError as Error};
    use cyphernet::{Digest, Ecdh};

    use super::*;
modified crates/radicle-node/src/reactor/transport.rs
@@ -286,8 +286,8 @@ impl<S: Session + Source> EventHandler for Transport<S> {
    type Reaction = SessionEvent<S>;

    fn interests(&self) -> Option<Interest> {
-
        use mio::Interest;
        use TransportState::*;
+
        use mio::Interest;

        match self.state {
            Init => Some(Interest::WRITABLE),
modified crates/radicle-node/src/runtime.rs
@@ -19,23 +19,23 @@ use radicle_signals::Signal;
use thiserror::Error;

use radicle::node;
+
use radicle::node::Event;
+
use radicle::node::UserAgent;
use radicle::node::address;
use radicle::node::address::Store as _;
use radicle::node::notifications;
use radicle::node::policy::config as policy;
-
use radicle::node::Event;
-
use radicle::node::UserAgent;
use radicle::profile::Home;
-
use radicle::{cob, git, storage, Storage};
+
use radicle::{Storage, cob, git, storage};

use crate::control;
-
use crate::node::{routing, NodeId};
+
use crate::node::{NodeId, routing};
use crate::reactor;
use crate::reactor::Reactor;
use crate::service::gossip;
use crate::wire::Wire;
use crate::worker;
-
use crate::{service, LocalTime};
+
use crate::{LocalTime, service};

pub use handle::Error as HandleError;
pub use handle::Handle;
@@ -282,22 +282,24 @@ impl Runtime {
            || control::listen(listener, handle)
        });

-
        let _signals = thread::spawn(&self.id, "signals", move || loop {
-
            use radicle::node::Handle as _;
-

-
            match self.signals.recv() {
-
                Ok(Signal::Terminate | Signal::Interrupt) => {
-
                    log::info!(target: "node", "Termination signal received; shutting down..");
-
                    self.handle.shutdown().ok();
-
                    break;
-
                }
-
                Ok(Signal::Hangup) => {
-
                    log::debug!(target: "node", "Hangup signal (SIGHUP) received; ignoring..");
-
                }
-
                Ok(Signal::WindowChanged) => {}
-
                Err(e) => {
-
                    log::warn!(target: "node", "Signal notifications channel error: {e}");
-
                    break;
+
        let _signals = thread::spawn(&self.id, "signals", move || {
+
            loop {
+
                use radicle::node::Handle as _;
+

+
                match self.signals.recv() {
+
                    Ok(Signal::Terminate | Signal::Interrupt) => {
+
                        log::info!(target: "node", "Termination signal received; shutting down..");
+
                        self.handle.shutdown().ok();
+
                        break;
+
                    }
+
                    Ok(Signal::Hangup) => {
+
                        log::debug!(target: "node", "Hangup signal (SIGHUP) received; ignoring..");
+
                    }
+
                    Ok(Signal::WindowChanged) => {}
+
                    Err(e) => {
+
                        log::warn!(target: "node", "Signal notifications channel error: {e}");
+
                        break;
+
                    }
                }
            }
        });
modified crates/radicle-node/src/runtime/handle.rs
@@ -1,7 +1,7 @@
use std::collections::HashSet;
use std::net;
-
use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::Arc;
+
use std::sync::atomic::{AtomicBool, Ordering};
use std::{fmt, io, time};

#[cfg(unix)]
modified crates/radicle-node/src/test/gossip.rs
@@ -1,15 +1,15 @@
use std::str::FromStr;

use radicle::node;
-
use radicle::node::device::Device;
use radicle::node::UserAgent;
+
use radicle::node::device::Device;
use radicle::test::fixtures::r#gen;

use crate::test::arbitrary;
use crate::{
+
    PROTOCOL_VERSION,
    prelude::{LocalDuration, LocalTime, Message},
    service::message::{InventoryAnnouncement, NodeAnnouncement},
-
    PROTOCOL_VERSION,
};

pub fn messages(count: usize, now: LocalTime, delta: LocalDuration) -> Vec<Message> {
@@ -23,11 +23,7 @@ pub fn messages(count: usize, now: LocalTime, delta: LocalDuration) -> Vec<Messa
        } else {
            let delta = LocalDuration::from_secs(rng.u64(0..delta.as_secs()));

-
            if rng.bool() {
-
                now + delta
-
            } else {
-
                now - delta
-
            }
+
            if rng.bool() { now + delta } else { now - delta }
        };

        msgs.push(Message::node(
modified crates/radicle-node/src/test/handle.rs
@@ -10,8 +10,8 @@ use radicle::storage::refs::{self, RefsAt};
use crate::identity::RepoId;
use crate::node::{Alias, Config, ConnectOptions, ConnectResult, Event, FetchResult, Seeds};
use crate::runtime::HandleError;
-
use radicle::node::policy;
use radicle::node::NodeId;
+
use radicle::node::policy;

#[derive(Default, Clone)]
pub struct Handle {
modified crates/radicle-node/src/test/node.rs
@@ -11,33 +11,33 @@ use std::{

use crossbeam_channel as chan;

+
use radicle::Storage;
use radicle::cob;
use radicle::cob::issue;
+
use radicle::crypto::Signature;
use radicle::crypto::signature::Signer;
use radicle::crypto::ssh::keystore::MemorySigner;
use radicle::crypto::test::signer::MockSigner;
-
use radicle::crypto::Signature;
use radicle::git;
use radicle::git::fmt::refname;
use radicle::identity::{RepoId, Visibility};
+
use radicle::node::Config;
+
use radicle::node::Event;
use radicle::node::config::ConnectAddress;
use radicle::node::policy::store as policy;
use radicle::node::seed::Store as _;
-
use radicle::node::Config;
-
use radicle::node::Event;
use radicle::node::{self, Alias};
use radicle::node::{ConnectOptions, Handle as _};
use radicle::node::{Database, POLICIES_DB_FILE};
-
use radicle::profile::{env, Home, Profile};
+
use radicle::profile::{Home, Profile, env};
use radicle::rad;
use radicle::storage::{ReadStorage as _, RemoteRepository as _, SignRepository as _};
use radicle::test::fixtures;
-
use radicle::Storage;

-
use crate::node::device::Device;
use crate::node::NodeId;
+
use crate::node::device::Device;
use crate::storage::git::transport;
-
use crate::{runtime, runtime::Handle, service, Runtime};
+
use crate::{Runtime, runtime, runtime::Handle, service};

/// A node that can be run.
pub struct Node<G> {
modified crates/radicle-node/src/test/peer.rs
@@ -7,19 +7,19 @@ use std::str::FromStr;

use log::*;

+
use radicle::Storage;
use radicle::crypto;
use radicle::git::Oid;
use radicle::identity::Visibility;
-
use radicle::node::address::Store as _;
-
use radicle::node::device::Device;
use radicle::node::Database;
use radicle::node::UserAgent;
-
use radicle::node::{address, Alias, ConnectOptions};
+
use radicle::node::address::Store as _;
+
use radicle::node::device::Device;
+
use radicle::node::{Alias, ConnectOptions, address};
use radicle::rad;
use radicle::storage::refs;
use radicle::storage::refs::{RefsAt, SignedRefs};
use radicle::storage::{ReadRepository, RemoteRepository};
-
use radicle::Storage;

use crate::crypto::test::signer::MockSigner;
use crate::identity::RepoId;
modified crates/radicle-node/src/test/simulator.rs
@@ -13,10 +13,11 @@ use std::{fmt, io, net};

use localtime::{LocalDuration, LocalTime};
use log::*;
-
use radicle::node::events::Event;
use radicle::node::NodeId;
+
use radicle::node::events::Event;
use radicle_protocol::worker::FetchError;

+
use crate::Link;
use crate::crypto;
use crate::prelude::{Address, RepoId};
use crate::service::io::Io;
@@ -26,7 +27,6 @@ use crate::storage::{ReadRepository, WriteStorage};
use crate::test::arbitrary;
use crate::test::peer::Service;
use crate::worker::fetch;
-
use crate::Link;

/// Minimum latency between peers.
pub const MIN_LATENCY: LocalDuration = LocalDuration::from_millis(1);
modified crates/radicle-node/src/tests.rs
@@ -13,15 +13,15 @@ use test_log::test;

use radicle::cob;
use radicle::identity::Visibility;
+
use radicle::node::Link;
use radicle::node::address::Store as _;
use radicle::node::device::Device;
use radicle::node::policy;
use radicle::node::refs::Store as _;
use radicle::node::routing::Store as _;
-
use radicle::node::Link;
use radicle::node::{ConnectOptions, DEFAULT_TIMEOUT};
-
use radicle::storage::refs::RefsAt;
use radicle::storage::RefUpdate;
+
use radicle::storage::refs::RefsAt;
use radicle::test::arbitrary::r#gen;
use radicle::test::storage::MockRepository;
use radicle_protocol::bounded::BoundedVec;
@@ -32,15 +32,15 @@ use crate::node;
use crate::node::config::*;
use crate::prelude::*;
use crate::prelude::{LocalDuration, Timestamp};
+
use crate::service::ServiceState as _;
use crate::service::filter::Filter;
use crate::service::io::Io;
use crate::service::message::*;
-
use crate::service::ServiceState as _;
use crate::service::*;
-
use crate::storage::git::transport::{local, remote};
+
use crate::storage::ReadStorage;
use crate::storage::git::Storage;
+
use crate::storage::git::transport::{local, remote};
use crate::storage::refs::SIGREFS_BRANCH;
-
use crate::storage::ReadStorage;
use crate::test::arbitrary;
use crate::test::assert_matches;
use crate::test::fixtures;
@@ -51,11 +51,11 @@ use crate::test::peer::Peer;
use crate::test::simulator;
use crate::test::simulator::{Peer as _, Simulation};

+
use crate::LocalTime;
use crate::test::storage::MockStorage;
use crate::wire::Decode;
use crate::wire::Encode;
use crate::worker::fetch;
-
use crate::LocalTime;
use crate::{git, identity, rad, runtime, service, test};

/// Default number of tests to run when testing things with high variance.
@@ -2040,13 +2040,14 @@ fn test_announcement_message_amplification() {

        // Make sure they have the routing table entry.
        for node in [&bob, &eve, &zod, &tom] {
-
            assert!(node
-
                .service
-
                .database()
-
                .routing()
-
                .get(&rid)
-
                .unwrap()
-
                .contains(&alice.id));
+
            assert!(
+
                node.service
+
                    .database()
+
                    .routing()
+
                    .get(&rid)
+
                    .unwrap()
+
                    .contains(&alice.id)
+
            );
        }

        // Count how many copies of Alice's inventory message have been received by peers.
modified crates/radicle-node/src/tests/e2e.rs
@@ -6,10 +6,10 @@ use radicle_crypto::test::signer::MockSigner;
use test_log::test;

use radicle::git::raw::ErrorExt as _;
+
use radicle::node::Event;
use radicle::node::device::Device;
use radicle::node::policy::Scope;
-
use radicle::node::Event;
-
use radicle::node::{Alias, ConnectResult, FetchResult, Handle as _, DEFAULT_TIMEOUT};
+
use radicle::node::{Alias, ConnectResult, DEFAULT_TIMEOUT, FetchResult, Handle as _};
use radicle::storage::{
    ReadRepository, ReadStorage, RefUpdate, RemoteRepository, SignRepository, ValidateRepository,
    WriteRepository, WriteStorage,
@@ -22,7 +22,7 @@ use crate::node::config::Limits;
use crate::node::{Config, ConnectOptions};
use crate::service;
use crate::storage::git::transport;
-
use crate::test::node::{converge, Node, NodeHandle};
+
use crate::test::node::{Node, NodeHandle, converge};

mod config {
    use super::*;
@@ -631,12 +631,13 @@ fn test_clone() {
    assert_eq!(canonical, oid);

    // Make sure that bob has refs/rad/id set
-
    assert!(bob
-
        .storage
-
        .repository(acme)
-
        .unwrap()
-
        .identity_head()
-
        .is_ok());
+
    assert!(
+
        bob.storage
+
            .repository(acme)
+
            .unwrap()
+
            .identity_head()
+
            .is_ok()
+
    );
}

#[test]
modified crates/radicle-node/src/wire.rs
@@ -1,8 +1,8 @@
//! Implementation of the transport protocol.
//!
//! We use the Noise XK handshake pattern to establish an encrypted stream with a remote peer.
-
use std::collections::hash_map::Entry;
use std::collections::VecDeque;
+
use std::collections::hash_map::Entry;
use std::fmt::Debug;
use std::sync::Arc;
use std::time::Instant;
@@ -19,9 +19,9 @@ use radicle::node::device::Device;

use radicle::collections::{RandomMap, RandomSet};
use radicle::crypto;
-
use radicle::node::config::AddressConfig;
use radicle::node::Link;
use radicle::node::NodeId;
+
use radicle::node::config::AddressConfig;
use radicle::storage::WriteStorage;
use radicle_protocol::deserializer::Deserializer;
pub use radicle_protocol::wire::frame;
@@ -34,9 +34,9 @@ use crate::reactor::{Listener, Transport};
use crate::reactor::{NoiseSession, ProtocolArtifact, SessionEvent, Socks5Session};
use crate::reactor::{Token, Tokens};
use crate::service;
-
use crate::service::io::Io;
use crate::service::FETCH_TIMEOUT;
-
use crate::service::{session, DisconnectReason, Metrics, Service};
+
use crate::service::io::Io;
+
use crate::service::{DisconnectReason, Metrics, Service, session};
use crate::worker;
use crate::worker::{ChannelEvent, ChannelsConfig};
use crate::worker::{Task, TaskResult};
@@ -897,7 +897,10 @@ where
                        e.remove();
                    }
                    Peer::Connected { nid, .. } => {
-
                        panic!("Wire::handover_transport: Unexpected handover of connected peer {nid} with token {}", token.0);
+
                        panic!(
+
                            "Wire::handover_transport: Unexpected handover of connected peer {nid} with token {}",
+
                            token.0
+
                        );
                    }
                }
            }
modified crates/radicle-node/src/worker.rs
@@ -16,13 +16,13 @@ use radicle::node::policy::config::SeedingPolicy;
use radicle::prelude::NodeId;
use radicle::storage::refs::RefsAt;
use radicle::storage::{ReadRepository, ReadStorage};
-
use radicle::{cob, crypto, Storage};
+
use radicle::{Storage, cob, crypto};

pub use radicle_protocol::worker::{
    AuthorizationError, FetchError, FetchRequest, FetchResult, UploadError,
};

-
use crate::runtime::{thread, Handle};
+
use crate::runtime::{Handle, thread};
use crate::wire::StreamId;

pub use channels::{ChannelEvent, Channels, ChannelsConfig};
@@ -154,13 +154,13 @@ impl Worker {
                                std::io::ErrorKind::UnexpectedEof,
                                "unexpected end of stream while reading upload-pack header",
                            ))),
-
                        }
+
                        };
                    }
                    Some(Err(e)) => {
                        return FetchResult::Responder {
                            rid: None,
                            result: Err(UploadError::PacketLine(e)),
-
                        }
+
                        };
                    }
                    Some(Ok(Err(e))) => {
                        return FetchResult::Responder {
@@ -169,7 +169,7 @@ impl Worker {
                                std::io::ErrorKind::InvalidData,
                                format!("invalid upload-pack header: {e}"),
                            ))),
-
                        }
+
                        };
                    }
                    Some(Ok(Ok(header))) => header,
                };
modified crates/radicle-node/src/worker/channels.rs
@@ -3,8 +3,8 @@ use std::ops::Deref;
use std::{fmt, io, time};

use crossbeam_channel as chan;
-
use radicle::node::config::FetchPackSizeLimit;
use radicle::node::NodeId;
+
use radicle::node::config::FetchPackSizeLimit;

use crate::runtime::Handle;
use crate::wire::StreamId;
modified crates/radicle-node/src/worker/fetch.rs
@@ -1,5 +1,5 @@
-
use radicle::identity::doc::CanonicalRefsError;
use radicle::identity::CanonicalRefs;
+
use radicle::identity::doc::CanonicalRefsError;
use radicle::storage::git::TempRepository;
pub(crate) use radicle_protocol::worker::fetch::error;

@@ -19,7 +19,7 @@ use radicle::storage::{
    ReadRepository, ReadStorage as _, RefUpdate, RemoteRepository, RepositoryError,
    WriteRepository as _,
};
-
use radicle::{cob, git, node, Storage};
+
use radicle::{Storage, cob, git, node};
use radicle_fetch::git::refs::Applied;
use radicle_fetch::{Allowed, BlockList};
pub use radicle_protocol::worker::fetch::{FetchResult, UpdatedCanonicalRefs};
modified crates/radicle-node/src/worker/upload_pack.rs
@@ -5,12 +5,12 @@ use std::time::{Duration, Instant};

use radicle_fetch::{ByteSlice as _, RemoteProgress};

+
use radicle::Storage;
use radicle::identity::RepoId;
use radicle::node::events;
use radicle::node::events::Emitter;
use radicle::node::{Event, NodeId};
use radicle::storage::git::paths;
-
use radicle::Storage;

use crate::runtime::thread;

modified crates/radicle-oid/src/lib.rs
@@ -509,7 +509,10 @@ mod serde {

                    fn expecting(&self, f: &mut fmt::Formatter) -> fmt::Result {
                        use crate::str::SHA1_DIGEST_STR_LEN;
-
                        write!(f, "a Git object identifier (SHA-1 digest in hexadecimal notation; {SHA1_DIGEST_STR_LEN} characters; {SHA1_DIGEST_LEN} bytes)")
+
                        write!(
+
                            f,
+
                            "a Git object identifier (SHA-1 digest in hexadecimal notation; {SHA1_DIGEST_STR_LEN} characters; {SHA1_DIGEST_LEN} bytes)"
+
                        )
                    }

                    fn visit_str<E>(self, s: &str) -> Result<Self::Value, E>
@@ -551,7 +554,7 @@ mod radicle_git_ref_format {
mod schemars {
    use alloc::{borrow::Cow, format};

-
    use ::schemars::{json_schema, JsonSchema, Schema, SchemaGenerator};
+
    use ::schemars::{JsonSchema, Schema, SchemaGenerator, json_schema};

    use super::Oid;

@@ -565,7 +568,7 @@ mod schemars {
        }

        fn json_schema(_: &mut SchemaGenerator) -> Schema {
-
            use crate::{str::SHA1_DIGEST_STR_LEN, SHA1_DIGEST_LEN};
+
            use crate::{SHA1_DIGEST_LEN, str::SHA1_DIGEST_STR_LEN};
            json_schema!({
                "description": format!("A Git object identifier (SHA-1 digest in hexadecimal notation; {SHA1_DIGEST_STR_LEN} characters; {SHA1_DIGEST_LEN} bytes)"),
                "type": "string",
modified crates/radicle-protocol/src/fetcher/service.rs
@@ -3,11 +3,12 @@ use std::collections::HashMap;
use radicle_core::{NodeId, RepoId};

use crate::fetcher::{
+
    RefsToFetch,
    state::{
+
        Config, FetcherState, QueuedFetch,
        command::{self},
-
        event, Config, FetcherState, QueuedFetch,
+
        event,
    },
-
    RefsToFetch,
};

/// Service layer that wraps [`FetcherState`] and manages subscriber coalescing.
modified crates/radicle-protocol/src/fetcher/test/queue.rs
@@ -11,8 +11,8 @@ use radicle::storage::refs::{FeatureLevel, RefsAt};
use radicle_core::RepoId;

use crate::fetcher::{
-
    state::{MaxQueueSize, QueuedFetch},
    FetchConfig,
+
    state::{MaxQueueSize, QueuedFetch},
};

impl Arbitrary for QueuedFetch {
modified crates/radicle-protocol/src/fetcher/test/queue/properties/capacity.rs
@@ -1,7 +1,7 @@
use qcheck_macros::quickcheck;

use crate::fetcher::test::queue::helpers::*;
-
use crate::fetcher::{state::Enqueue, MaxQueueSize};
+
use crate::fetcher::{MaxQueueSize, state::Enqueue};
use crate::fetcher::{Queue, QueuedFetch};

#[quickcheck]
modified crates/radicle-protocol/src/fetcher/test/queue/properties/equality.rs
@@ -14,9 +14,5 @@ fn symmetric(a: QueuedFetch, b: QueuedFetch) -> bool {

#[quickcheck]
fn transitive(a: QueuedFetch, b: QueuedFetch, c: QueuedFetch) -> bool {
-
    if a == b && b == c {
-
        a == c
-
    } else {
-
        true
-
    }
+
    if a == b && b == c { a == c } else { true }
}
modified crates/radicle-protocol/src/fetcher/test/queue/properties/fifo.rs
@@ -1,8 +1,8 @@
use qcheck_macros::quickcheck;

+
use crate::fetcher::QueuedFetch;
use crate::fetcher::state::Enqueue;
use crate::fetcher::test::queue::helpers::*;
-
use crate::fetcher::QueuedFetch;

#[quickcheck]
fn ordering(count: u8) -> bool {
modified crates/radicle-protocol/src/fetcher/test/queue/unit.rs
@@ -3,11 +3,11 @@ use std::time::Duration;
use radicle::test::arbitrary;
use radicle_core::RepoId;

-
use crate::fetcher::state::Enqueue;
-
use crate::fetcher::test::queue::helpers::*;
use crate::fetcher::FetchConfig;
use crate::fetcher::QueuedFetch;
use crate::fetcher::RefsToFetch;
+
use crate::fetcher::state::Enqueue;
+
use crate::fetcher::test::queue::helpers::*;

#[test]
fn zero_timeout_accepted() {
modified crates/radicle-protocol/src/service.rs
@@ -42,14 +42,14 @@ use radicle::storage::{RepositoryError, RepositoryInfo, SignedRefsInfo};
use radicle_fetch::policy::SeedingPolicy;

use crate::fetcher;
-
use crate::fetcher::service::FetcherService;
use crate::fetcher::FetcherState;
use crate::fetcher::RefsToFetch;
+
use crate::fetcher::service::FetcherService;
use crate::service::gossip::Store as _;
use crate::service::message::{
    Announcement, AnnouncementMessage, Info, NodeAnnouncement, Ping, RefsAnnouncement, RefsStatus,
};
-
use crate::service::policy::{store::Write, Scope};
+
use crate::service::policy::{Scope, store::Write};
use radicle::identity::RepoId;
use radicle::node::events::Emitter;
use radicle::node::routing;
@@ -57,7 +57,7 @@ use radicle::node::routing::InsertResult;
use radicle::node::{Address, Features, FetchResult, HostName, Seed, Seeds, SyncStatus, SyncedAt};
use radicle::prelude::*;
use radicle::storage;
-
use radicle::storage::{refs::RefsAt, Namespaces, ReadStorage};
+
use radicle::storage::{Namespaces, ReadStorage, refs::RefsAt};
// use radicle::worker::fetch;
// use crate::worker::FetchError;
use radicle::crypto;
modified crates/radicle-protocol/src/service/command.rs
@@ -4,9 +4,9 @@ use crossbeam_channel::Receiver;
use crossbeam_channel::SendError;
use crossbeam_channel::Sender;
use radicle::crypto::PublicKey;
-
use radicle::node::policy::Scope;
use radicle::node::FetchResult;
use radicle::node::Seeds;
+
use radicle::node::policy::Scope;
use radicle::node::{Address, Alias, Config, ConnectOptions};
use radicle::storage::refs;
use radicle::storage::refs::RefsAt;
modified crates/radicle-protocol/src/service/gossip.rs
@@ -5,8 +5,8 @@ use std::sync::LazyLock;

use super::*;
use crate::bounded::BoundedVec;
-
use radicle::node::UserAgent;
use radicle::node::PROTOCOL_VERSION;
+
use radicle::node::UserAgent;

pub use store::{AnnouncementId, Error, RelayStatus, Store};

modified crates/radicle-protocol/src/service/io.rs
@@ -3,16 +3,16 @@ use std::collections::VecDeque;
use localtime::LocalDuration;
use log::*;
use radicle::identity::RepoId;
-
use radicle::node::config::FetchPackSizeLimit;
use radicle::node::Address;
use radicle::node::NodeId;
+
use radicle::node::config::FetchPackSizeLimit;
use radicle::storage::refs::RefsAt;

use crate::fetcher;
-
use crate::service::message::Message;
-
use crate::service::session::Session;
use crate::service::DisconnectReason;
use crate::service::Link;
+
use crate::service::message::Message;
+
use crate::service::session::Session;

use super::gossip;
use super::message::{Announcement, AnnouncementMessage};
modified crates/radicle-protocol/src/service/limiter.rs
@@ -1,7 +1,7 @@
use std::collections::{HashMap, HashSet};

use localtime::LocalTime;
-
use radicle::node::{address, config, HostName, NodeId};
+
use radicle::node::{HostName, NodeId, address, config};

/// Peer rate limiter.
///
modified crates/radicle-protocol/src/service/message.rs
@@ -482,26 +482,35 @@ impl Message {
        };
        let msg = match self {
            Self::Announcement(Announcement { node, message, .. }) => match message {
-
                AnnouncementMessage::Node(NodeAnnouncement { addresses, timestamp, .. }) => format!(
+
                AnnouncementMessage::Node(NodeAnnouncement {
+
                    addresses,
+
                    timestamp,
+
                    ..
+
                }) => format!(
                    "{verb} node announcement of {node} with {} address(es) {prep} {remote} (t={timestamp})",
                    addresses.len()
                ),
-
                AnnouncementMessage::Refs(RefsAnnouncement { rid, refs, timestamp }) => format!(
+
                AnnouncementMessage::Refs(RefsAnnouncement {
+
                    rid,
+
                    refs,
+
                    timestamp,
+
                }) => format!(
                    "{verb} refs announcement of {node} for {rid} with {} remote(s) {prep} {remote} (t={timestamp})",
                    refs.len()
                ),
-
                AnnouncementMessage::Inventory(InventoryAnnouncement { inventory, timestamp }) => {
+
                AnnouncementMessage::Inventory(InventoryAnnouncement {
+
                    inventory,
+
                    timestamp,
+
                }) => {
                    format!(
                        "{verb} inventory announcement of {node} with {} item(s) {prep} {remote} (t={timestamp})",
                        inventory.len()
                    )
                }
            },
-
            Self::Info(Info::RefsAlreadySynced { rid,  .. }) => {
-
                format!(
-
                    "{verb} `refs-already-synced` info {prep} {remote} for {rid}"
-
                )
-
            },
+
            Self::Info(Info::RefsAlreadySynced { rid, .. }) => {
+
                format!("{verb} `refs-already-synced` info {prep} {remote} for {rid}")
+
            }
            Self::Ping { .. } => format!("{verb} ping {prep} {remote}"),
            Self::Pong { .. } => format!("{verb} pong {prep} {remote}"),
            Self::Subscribe(Subscribe { .. }) => {
@@ -530,7 +539,7 @@ impl Ping {
    /// Maximum number of zero bytes in a pong message.
    pub const MAX_PONG_ZEROES: wire::Size =
        Message::MAX_SIZE - mem::size_of::<wire::Size>() as wire::Size; // Account for zeroes length
-
                                                                        // prefix.
+
    // prefix.

    pub fn new(rng: &mut fastrand::Rng) -> Self {
        let ponglen = rng.u16(0..Self::MAX_PONG_ZEROES);
modified crates/radicle-protocol/src/wire.rs
@@ -85,7 +85,9 @@ pub enum Error {
    #[error(transparent)]
    Invalid(#[from] Invalid),

-
    #[error("unexpected end of buffer, requested {requested} more bytes but only {available} are available")]
+
    #[error(
+
        "unexpected end of buffer, requested {requested} more bytes but only {available} are available"
+
    )]
    UnexpectedEnd { available: usize, requested: usize },
}

modified crates/radicle-protocol/src/wire/frame.rs
@@ -6,7 +6,7 @@ use bytes::{Buf, BufMut};
use radicle::node::Link;

use crate::service::Message;
-
use crate::{wire, wire::varint, wire::varint::VarInt, PROTOCOL_VERSION};
+
use crate::{PROTOCOL_VERSION, wire, wire::varint, wire::varint::VarInt};

/// Protocol version strings all start with the magic sequence `rad`, followed
/// by a version number.
modified crates/radicle-protocol/src/wire/message.rs
@@ -2,7 +2,7 @@ use std::{mem, net};

use bytes::Buf;
use bytes::BufMut;
-
use cypheraddr::{tor, HostName, NetAddr};
+
use cypheraddr::{HostName, NetAddr, tor};
use radicle::crypto::Signature;
use radicle::git::Oid;
use radicle::identity::RepoId;
@@ -426,14 +426,14 @@ impl wire::Decode for ZeroBytes {
#[cfg(test)]
mod tests {
    use qcheck_macros::quickcheck;
-
    use radicle::node::device::Device;
    use radicle::node::UserAgent;
+
    use radicle::node::device::Device;
    use radicle::storage::refs::RefsAt;
    use radicle::test::arbitrary;

    use crate::deserializer::Deserializer;
    use crate::prop_roundtrip;
-
    use crate::wire::{roundtrip, Encode as _};
+
    use crate::wire::{Encode as _, roundtrip};

    use super::*;

modified crates/radicle-protocol/src/worker/fetch/error.rs
@@ -19,7 +19,9 @@ pub enum Fetch {
    Repository(#[from] radicle::storage::RepositoryError),
    #[error(transparent)]
    RefsDb(Box<radicle::node::refs::Error>),
-
    #[error("validation of the storage repository failed: the delegates {delegates:?} failed to validate to meet a threshold of {threshold}")]
+
    #[error(
+
        "validation of the storage repository failed: the delegates {delegates:?} failed to validate to meet a threshold of {threshold}"
+
    )]
    Validation {
        threshold: usize,
        delegates: Vec<String>,
modified crates/radicle-remote-helper/src/fetch.rs
@@ -5,8 +5,8 @@ use thiserror::Error;

use radicle::git;

-
use crate::service::GitService;
use crate::Verbosity;
+
use crate::service::GitService;

#[derive(Debug, Error)]
pub(super) enum Error {
@@ -24,7 +24,9 @@ pub(super) enum Error {
    InvalidOid(#[from] radicle::git::ParseOidError),

    /// Error fetching pack from storage to working copy.
-
    #[error("`git fetch-pack` failed with exit status {status}, stderr and stdout follow:\n{stderr}\n{stdout}")]
+
    #[error(
+
        "`git fetch-pack` failed with exit status {status}, stderr and stdout follow:\n{stderr}\n{stdout}"
+
    )]
    FetchPackFailed {
        status: ExitStatus,
        stderr: String,
modified crates/radicle-remote-helper/src/list.rs
@@ -2,12 +2,12 @@ use radicle::patch::cache::Patches as _;
use radicle::profile;
use thiserror::Error;

+
use radicle::Profile;
use radicle::cob;
use radicle::git;
use radicle::prelude::NodeId;
-
use radicle::storage::git::transport::local::Url;
use radicle::storage::ReadRepository;
-
use radicle::Profile;
+
use radicle::storage::git::transport::local::Url;

#[derive(Debug, Error)]
pub(super) enum Error {
modified crates/radicle-remote-helper/src/main.rs
@@ -34,8 +34,8 @@ use radicle::prelude::NodeId;
use radicle::storage::git::transport::local::{Url, UrlError};
use radicle::storage::{ReadRepository, WriteStorage};
use radicle::version::Version;
+
use radicle::{Profile, git, storage};
use radicle::{cob, profile};
-
use radicle::{git, storage, Profile};
use radicle_cli::terminal as cli;

use crate::protocol::{Command, Line, LineReader};
modified crates/radicle-remote-helper/src/push.rs
@@ -13,6 +13,7 @@ use radicle::identity::doc::CanonicalRefsError;
use radicle::node::device::Device;
use thiserror::Error;

+
use radicle::Profile;
use radicle::cob;
use radicle::cob::object::ParseObjectId;
use radicle::cob::patch;
@@ -25,13 +26,12 @@ use radicle::node::NodeId;
use radicle::storage;
use radicle::storage::git::transport::local::Url;
use radicle::storage::{ReadRepository, SignRepository as _, WriteRepository};
-
use radicle::Profile;
use radicle::{git, rad};
use radicle_cli::terminal as term;

use crate::service::GitService;
use crate::service::NodeSession;
-
use crate::{hint, warn, Options, Verbosity};
+
use crate::{Options, Verbosity, hint, warn};

#[derive(Debug, Error)]
pub(super) enum Error {
@@ -39,7 +39,9 @@ pub(super) enum Error {
    #[error("cannot push to remote namespace owned by {0}")]
    KeyMismatch(Did),
    /// No public key is given
-
    #[error("no public key given as a remote namespace, perhaps you are attempting to push to restricted refs")]
+
    #[error(
+
        "no public key given as a remote namespace, perhaps you are attempting to push to restricted refs"
+
    )]
    NoKey,
    /// User tried to delete the canonical branch.
    #[error("refusing to delete default branch ref '{0}'")]
@@ -116,7 +118,9 @@ pub(super) enum Error {
    FindObjects(#[from] git::canonical::error::FindObjectsError),

    /// Error sending pack from the working copy to storage.
-
    #[error("`git send-pack` failed with exit status {status}, stderr and stdout follow:\n{stderr}\n{stdout}")]
+
    #[error(
+
        "`git send-pack` failed with exit status {status}, stderr and stdout follow:\n{stderr}\n{stdout}"
+
    )]
    SendPackFailed {
        status: ExitStatus,
        stderr: String,
modified crates/radicle-remote-helper/src/push/canonical.rs
@@ -1,8 +1,8 @@
use radicle::git;
use radicle::git::canonical;
+
use radicle::git::canonical::QuorumWithConvergence;
use radicle::git::canonical::effects;
use radicle::git::canonical::error::QuorumError;
-
use radicle::git::canonical::QuorumWithConvergence;
use radicle::prelude::Did;

/// Validates a vote to update a canonical reference during push.
modified crates/radicle-remote-helper/src/push/error.rs
@@ -26,7 +26,9 @@ pub(crate) struct GraphDescendant {

#[derive(Debug, Error)]
/// Head being pushed diverges from canonical head.
-
#[error("refusing to update canonical reference to commit that is not a descendant of current canonical head")]
+
#[error(
+
    "refusing to update canonical reference to commit that is not a descendant of current canonical head"
+
)]
pub(crate) struct HeadsDiverge {
    head: git::Oid,
    canonical: git::Oid,
modified crates/radicle-remote-helper/src/service.rs
@@ -3,11 +3,11 @@ use std::io::IsTerminal;
use std::path::Path;
use std::process;

+
use radicle::Profile;
use radicle::explorer::ExplorerResource;
use radicle::git;
use radicle::node::Handle;
use radicle::storage;
-
use radicle::Profile;
use radicle_cli::node::{SyncError, SyncReporting, SyncSettings};
use radicle_cli::terminal as term;

modified crates/radicle-signals/src/windows.rs
@@ -3,13 +3,13 @@ use std::sync::OnceLock;

use crossbeam_channel as chan;

-
use ::windows::core::BOOL;
use ::windows::Win32::System::Console::{
-
    SetConsoleCtrlHandler, CTRL_BREAK_EVENT, CTRL_CLOSE_EVENT, CTRL_C_EVENT, CTRL_LOGOFF_EVENT,
-
    CTRL_SHUTDOWN_EVENT,
+
    CTRL_BREAK_EVENT, CTRL_C_EVENT, CTRL_CLOSE_EVENT, CTRL_LOGOFF_EVENT, CTRL_SHUTDOWN_EVENT,
+
    SetConsoleCtrlHandler,
};
+
use ::windows::core::BOOL;

-
use crate::{already_installed, Signal};
+
use crate::{Signal, already_installed};

static NOTIFY: OnceLock<chan::Sender<Signal>> = OnceLock::new();

modified crates/radicle-ssh/src/agent/client.rs
@@ -11,8 +11,8 @@ pub use winpipe::WinStream as Stream;
use thiserror::Error;
use zeroize::Zeroize as _;

-
use crate::agent::msg;
use crate::agent::Constraint;
+
use crate::agent::msg;
use crate::encoding::{self, Encodable};
use crate::encoding::{Buffer, Encoding, Reader};

@@ -97,13 +97,13 @@ impl AgentClient<Stream> {
                return Err(Error::BadAuthSock {
                    path: path.display().to_string(),
                    source: err,
-
                })
+
                });
            }
            Err(err) => {
                return Err(Error::Connect {
                    path: path.display().to_string(),
                    source: err,
-
                })
+
                });
            }
            Ok(stream) => stream,
        };
modified crates/radicle-systemd/src/credential.rs
@@ -1,7 +1,7 @@
-
use std::env::{var, VarError::*};
+
use std::env::{VarError::*, var};
use std::ffi::OsString;
use std::fmt;
-
use std::path::{is_separator, PathBuf};
+
use std::path::{PathBuf, is_separator};

const CREDENTIALS_DIRECTORY: &str = "CREDENTIALS_DIRECTORY";

@@ -39,8 +39,12 @@ impl fmt::Display for PathError {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        use PathError::*;
        match self {
-
		InvalidCredentialId { id } => write!(f, "The systemd credential ID '{id}' is invalid."),
-
		EnvVarNotUnicode { os } => write!(f, "The value of environment variable '{CREDENTIALS_DIRECTORY}' is not valid Unicode (it lossily translates to '{}').", os.to_string_lossy()),
-
	}
+
            InvalidCredentialId { id } => write!(f, "The systemd credential ID '{id}' is invalid."),
+
            EnvVarNotUnicode { os } => write!(
+
                f,
+
                "The value of environment variable '{CREDENTIALS_DIRECTORY}' is not valid Unicode (it lossily translates to '{}').",
+
                os.to_string_lossy()
+
            ),
+
        }
    }
}
modified crates/radicle-systemd/src/journal.rs
@@ -1,4 +1,4 @@
-
use systemd_journal_logger::{connected_to_journal, JournalLog};
+
use systemd_journal_logger::{JournalLog, connected_to_journal};

/// If the current process is directly connected to the systemd journal,
/// return a logger that will write to it.
modified crates/radicle-systemd/src/listen.rs
@@ -1,4 +1,4 @@
-
use std::env::{remove_var, var, VarError};
+
use std::env::{VarError, remove_var, var};
use std::os::fd::RawFd;
use std::process::id;

modified crates/radicle-term/src/ansi.rs
@@ -10,8 +10,8 @@ mod style;
mod tests;

pub use color::Color;
-
pub use paint::paint;
pub use paint::Filled;
pub use paint::Paint;
pub use paint::TerminalFile;
+
pub use paint::paint;
pub use style::Style;
modified crates/radicle-term/src/ansi/paint.rs
@@ -1,6 +1,6 @@
use std::io::IsTerminal as _;
-
use std::sync::atomic::{AtomicBool, AtomicI32};
use std::sync::LazyLock;
+
use std::sync::atomic::{AtomicBool, AtomicI32};
use std::{fmt, sync};

use super::color::Color;
modified crates/radicle-term/src/element.rs
@@ -4,7 +4,7 @@ use std::ops::Deref;
use std::{io, vec};

use crate::cell::Cell;
-
use crate::{viewport, Color, Filled, Label, Style};
+
use crate::{Color, Filled, Label, Style, viewport};

/// Rendering constraint.
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
modified crates/radicle-term/src/io.rs
@@ -4,15 +4,15 @@ use std::process::Stdio;
use std::sync::LazyLock;
use std::{env, fmt, io, process};

+
use inquire::InquireError;
use inquire::ui::{ErrorMessageRenderConfig, StyleSheet, Styled};
use inquire::validator;
-
use inquire::InquireError;
-
use inquire::{ui::Color, ui::RenderConfig, Confirm, CustomType, Password};
+
use inquire::{Confirm, CustomType, Password, ui::Color, ui::RenderConfig};
use thiserror::Error;
use zeroize::Zeroizing;

use crate::format;
-
use crate::{style, Paint, Size};
+
use crate::{Paint, Size, style};

pub use inquire;
pub use inquire::Select;
modified crates/radicle-term/src/label.rs
@@ -1,6 +1,6 @@
use std::fmt;

-
use crate::{cell::Cell, Color, Constraint, Element, Filled, Line, Paint, Size, Style};
+
use crate::{Color, Constraint, Element, Filled, Line, Paint, Size, Style, cell::Cell};

/// A styled string that does not contain any `'\n'` and implements [`Element`] and [`Cell`].
#[derive(Clone, Default, Debug)]
modified crates/radicle-term/src/lib.rs
@@ -16,16 +16,16 @@ use std::fmt;
use std::io::IsTerminal;

pub use ansi::Color;
-
pub use ansi::{paint, Filled, Paint, Style, TerminalFile};
+
pub use ansi::{Filled, Paint, Style, TerminalFile, paint};
pub use editor::Editor;
pub use element::{Constraint, Element, Line, Size};
pub use hstack::HStack;
pub use inquire::ui::Styled;
pub use io::*;
-
pub use label::{label, Label};
-
pub use spinner::{spinner, spinner_to, Spinner};
+
pub use label::{Label, label};
+
pub use spinner::{Spinner, spinner, spinner_to};
pub use table::{Table, TableOptions};
-
pub use textarea::{textarea, TextArea};
+
pub use textarea::{TextArea, textarea};
pub use vstack::{VStack, VStackOptions};

#[derive(Debug, PartialEq, Eq, Copy, Clone, Default)]
@@ -49,11 +49,7 @@ impl Interactive {
    }

    pub fn confirm(&self, prompt: impl fmt::Display) -> bool {
-
        if self.yes() {
-
            confirm(prompt)
-
        } else {
-
            true
-
        }
+
        if self.yes() { confirm(prompt) } else { true }
    }
}

@@ -68,11 +64,7 @@ impl From<Interactive> for bool {

impl From<bool> for Interactive {
    fn from(b: bool) -> Self {
-
        if b {
-
            Interactive::Yes
-
        } else {
-
            Interactive::No
-
        }
+
        if b { Interactive::Yes } else { Interactive::No }
    }
}

modified crates/radicle-term/src/textarea.rs
@@ -1,4 +1,4 @@
-
use crate::{cell::Cell, Constraint, Element, Line, Paint, Size};
+
use crate::{Constraint, Element, Line, Paint, Size, cell::Cell};

/// Default text wrap width.
pub const DEFAULT_WRAP: usize = 80;
modified crates/radicle-windows/src/jobs.rs
@@ -2,11 +2,11 @@ use std::io;
use std::os::windows::io::AsRawHandle as _;

use windows::{
-
    core::PCWSTR,
    Win32::{
        Foundation::{CloseHandle, HANDLE},
        System::JobObjects::{AssignProcessToJobObject, CreateJobObjectW, TerminateJobObject},
    },
+
    core::PCWSTR,
};

use thiserror::Error;
modified crates/radicle/src/cob.rs
@@ -16,13 +16,13 @@ pub mod test;
#[cfg(test)]
pub use radicle_cob::stable;

-
pub use cache::{migrate, MigrateCallback};
+
pub use cache::{MigrateCallback, migrate};
pub use common::*;
pub use op::{ActorId, Op};
pub use radicle_cob::{
-
    change, history::EntryId, object, object::collaboration::error, type_name::TypeNameParse,
    CollaborativeObject, Contents, Create, Embed, Entry, Evaluate, History, Manifest, ObjectId,
-
    Store, TypeName, Update, Updated, Version,
+
    Store, TypeName, Update, Updated, Version, change, history::EntryId, object,
+
    object::collaboration::error, type_name::TypeNameParse,
};
pub use radicle_cob::{create, get, list, remove, update};

modified crates/radicle/src/cob/common.rs
@@ -4,7 +4,7 @@ use std::ops::{Deref, Range};
use std::path::PathBuf;
use std::str::FromStr;

-
use base64::prelude::{Engine, BASE64_STANDARD};
+
use base64::prelude::{BASE64_STANDARD, Engine};
use localtime::LocalTime;
use serde::{Deserialize, Serialize};
use thiserror::Error;
@@ -454,11 +454,7 @@ pub enum Authorization {

impl From<bool> for Authorization {
    fn from(value: bool) -> Self {
-
        if value {
-
            Self::Allow
-
        } else {
-
            Self::Deny
-
        }
+
        if value { Self::Allow } else { Self::Deny }
    }
}

modified crates/radicle/src/cob/external.rs
@@ -87,7 +87,7 @@ use std::process::{Command, Stdio};
use serde::{Deserialize, Serialize};
use thiserror::Error;

-
use serde_json::{from_slice, to_writer, Error as JsonError, Map, Value};
+
use serde_json::{Error as JsonError, Map, Value, from_slice, to_writer};

use crate::cob::object::collaboration::Evaluate;
use crate::cob::op::{Op as CobOp, OpEncodingError};
modified crates/radicle/src/cob/identity.rs
@@ -10,19 +10,18 @@ use thiserror::Error;
use crate::git;
use crate::git::Oid;
use crate::identity::doc::Doc;
-
use crate::node::device::Device;
use crate::node::NodeId;
+
use crate::node::device::Device;
use crate::storage;
use crate::{
    cob,
    cob::{
-
        op, store,
+
        ActorId, Timestamp, Uri, op, store,
        store::{Cob, CobAction, Transaction},
-
        ActorId, Timestamp, Uri,
    },
    identity::{
-
        doc::{DocError, RepoId},
        Did,
+
        doc::{DocError, RepoId},
    },
    storage::{ReadRepository, RepositoryError, WriteRepository},
};
@@ -1074,12 +1073,12 @@ mod test {

    use crate::cob::{self, Title};
    use crate::crypto::PublicKey;
+
    use crate::identity::Visibility;
    use crate::identity::did::Did;
    use crate::identity::doc::PayloadId;
-
    use crate::identity::Visibility;
    use crate::rad;
-
    use crate::storage::git::Storage;
    use crate::storage::ReadStorage;
+
    use crate::storage::git::Storage;
    use crate::test::fixtures;
    use crate::test::setup::{Network, NodeWithRepo};

modified crates/radicle/src/cob/issue.rs
@@ -13,11 +13,11 @@ use crate::cob::common::{Author, Authorization, Label, Reaction, Timestamp, Uri}
use crate::cob::store::Transaction;
use crate::cob::store::{Cob, CobAction};
use crate::cob::thread::{Comment, CommentId, Thread};
-
use crate::cob::{op, store, ActorId, Embed, EntryId, ObjectId, TypeName};
-
use crate::cob::{thread, TitleError};
+
use crate::cob::{ActorId, Embed, EntryId, ObjectId, TypeName, op, store};
+
use crate::cob::{TitleError, thread};
use crate::identity::doc::DocError;
-
use crate::node::device::Device;
use crate::node::NodeId;
+
use crate::node::device::Device;
use crate::prelude::{Did, Doc, ReadRepository, RepoId};
use crate::storage;
use crate::storage::{HasRepoId, RepositoryError, WriteRepository};
@@ -981,7 +981,7 @@ mod test {
    use pretty_assertions::assert_eq;

    use super::*;
-
    use crate::cob::{store::CobWithType, ActorId, Reaction};
+
    use crate::cob::{ActorId, Reaction, store::CobWithType};
    use crate::git::Oid;
    use crate::issue::cache::Issues as _;
    use crate::test::arbitrary;
modified crates/radicle/src/cob/issue/cache.rs
@@ -9,8 +9,8 @@ use crate::cob::cache;
use crate::cob::cache::{Remove, StoreReader, StoreWriter, Update};
use crate::cob::store;
use crate::cob::{Embed, Label, ObjectId, TypeName, Uri};
-
use crate::node::device::Device;
use crate::node::NodeId;
+
use crate::node::device::Device;
use crate::prelude::{Did, RepoId};
use crate::storage::{HasRepoId, ReadRepository, RepositoryError, SignRepository, WriteRepository};

modified crates/radicle/src/cob/op.rs
@@ -122,10 +122,10 @@ impl<A> Op<A> {
    pub fn manifest_of<S>(store: &S, id: &git::Oid) -> Result<Manifest, ManifestError>
    where
        S: cob::change::Storage<
-
            ObjectId = git::Oid,
-
            Parent = git::Oid,
-
            Signatures = crypto::ssh::ExtendedSignature,
-
        >,
+
                ObjectId = git::Oid,
+
                Parent = git::Oid,
+
                Signatures = crypto::ssh::ExtendedSignature,
+
            >,
    {
        store.manifest_of(id).map_err(|err| ManifestError {
            object: *id,
@@ -137,10 +137,10 @@ impl<A> Op<A> {
    pub fn load<S>(store: &S, id: git::Oid) -> Result<Self, LoadError>
    where
        S: cob::change::Storage<
-
            ObjectId = git::Oid,
-
            Parent = git::Oid,
-
            Signatures = crypto::ssh::ExtendedSignature,
-
        >,
+
                ObjectId = git::Oid,
+
                Parent = git::Oid,
+
                Signatures = crypto::ssh::ExtendedSignature,
+
            >,
        for<'de> A: serde::Deserialize<'de>,
    {
        let entry = store.load(id).map_err(|err| LoadError::Load {
modified crates/radicle/src/cob/patch.rs
@@ -25,11 +25,11 @@ use crate::cob::store::{Cob, CobAction};
use crate::cob::thread;
use crate::cob::thread::Thread;
use crate::cob::thread::{Comment, CommentId, Edit, Reactions};
-
use crate::cob::{op, store, ActorId, Embed, EntryId, ObjectId, TypeName, Uri};
+
use crate::cob::{ActorId, Embed, EntryId, ObjectId, TypeName, Uri, op, store};
use crate::crypto::PublicKey;
use crate::git;
-
use crate::identity::doc::{DocAt, DocError};
use crate::identity::PayloadError;
+
use crate::identity::doc::{DocAt, DocError};
use crate::node::device::Device;
use crate::prelude::*;
use crate::storage;
@@ -2868,7 +2868,7 @@ mod ser {

    use serde::ser::SerializeSeq;

-
    use crate::cob::{thread::Reactions, ActorId, CodeLocation};
+
    use crate::cob::{ActorId, CodeLocation, thread::Reactions};

    /// Serialize a `Revision`'s reaction as an object containing the
    /// `location`, `emoji`, and all `authors` that have performed the
modified crates/radicle/src/cob/patch/actions.rs
@@ -5,9 +5,9 @@

use serde::{Deserialize, Serialize};

-
use crate::cob::{thread::Edit, ActorId, Embed, Label, Timestamp, Uri};
+
use crate::cob::{ActorId, Embed, Label, Timestamp, Uri, thread::Edit};

-
use super::{lookup, Error, Patch, ReviewId, Verdict};
+
use super::{Error, Patch, ReviewId, Verdict, lookup};

/// A review edit that keeps track of the different versions of actions.
///
modified crates/radicle/src/cob/patch/cache.rs
@@ -712,7 +712,7 @@ mod tests {

    use crate::cob::cache::{Store, Update, Write};
    use crate::cob::thread::{Comment, Thread};
-
    use crate::cob::{migrate, Author, Title};
+
    use crate::cob::{Author, Title, migrate};
    use crate::patch::{
        ByRevision, MergeTarget, Patch, PatchCounts, PatchId, Revision, RevisionId, State, Status,
    };
modified crates/radicle/src/cob/patch/encoding/review.rs
@@ -127,7 +127,7 @@ mod test {
    use serde_json::json;

    use crate::{
-
        cob::{thread::Edit, Timestamp},
+
        cob::{Timestamp, thread::Edit},
        patch,
    };

modified crates/radicle/src/cob/store.rs
@@ -13,8 +13,8 @@ use crate::cob::{Create, Embed, EntryId, ObjectId, TypeName, Update, Updated, Ur
use crate::git;
use crate::node::device::Device;
use crate::prelude::*;
-
use crate::storage::git as storage;
use crate::storage::SignRepository;
+
use crate::storage::git as storage;
use crate::{cob, identity};

pub trait CobAction {
@@ -129,7 +129,9 @@ pub enum Error {
        #[source]
        err: git::raw::Error,
    },
-
    #[error("transaction already contains action {0} which produces an identifier, denying to add action {1} which also produces an identifier")]
+
    #[error(
+
        "transaction already contains action {0} which produces an identifier, denying to add action {1} which also produces an identifier"
+
    )]
    ClashingIdentifiers(String, String),
}

@@ -344,7 +346,8 @@ where
    /// Return all objects.
    pub fn all(
        &self,
-
    ) -> Result<impl ExactSizeIterator<Item = Result<(ObjectId, T), Error>> + use<'a, T, R>, Error> {
+
    ) -> Result<impl ExactSizeIterator<Item = Result<(ObjectId, T), Error>> + use<'a, T, R>, Error>
+
    {
        let raw = cob::list::<T, _>(self.repo, self.type_name)?;

        Ok(raw.into_iter().map(|o| Ok((*o.id(), o.object))))
modified crates/radicle/src/cob/stream/iter.rs
@@ -4,11 +4,11 @@ use serde::Deserialize;

use crate::cob::{Op, TypeName};
use crate::git;
-
use crate::git::fmt::refspec::PatternString;
use crate::git::Oid;
+
use crate::git::fmt::refspec::PatternString;

-
use super::error;
use super::CobRange;
+
use super::error;

/// A `Walk` specifies a range to construct a [`WalkIter`].
#[derive(Clone, Debug)]
modified crates/radicle/src/cob/test.rs
@@ -9,8 +9,8 @@ use serde::{Deserialize, Serialize};
use crate::cob::op::Op;
use crate::cob::patch::Patch;
use crate::cob::store::encoding;
-
use crate::cob::{patch, Title};
use crate::cob::{Entry, History, Manifest, Timestamp, Version};
+
use crate::cob::{Title, patch};
use crate::crypto::Signer;
use crate::git::Oid;
use crate::node::device::Device;
@@ -257,7 +257,7 @@ fn encoded<T: Cob, G: Signer>(
) -> (Vec<u8>, crate::git::Oid) {
    use radicle_git_metadata::{
        author::{Author, Time},
-
        commit::{headers::Headers, trailers::OwnedTrailer, CommitData},
+
        commit::{CommitData, headers::Headers, trailers::OwnedTrailer},
    };

    let data = encoding::encode(action).unwrap();
modified crates/radicle/src/cob/thread.rs
@@ -3,13 +3,13 @@ use std::collections::{BTreeMap, BTreeSet};
use std::str::FromStr;
use std::sync::LazyLock;

-
use serde::{ser::SerializeStruct, Deserialize, Serialize};
+
use serde::{Deserialize, Serialize, ser::SerializeStruct};
use thiserror::Error;

use crate::cob;
use crate::cob::common::{Reaction, Timestamp, Uri};
use crate::cob::store::Cob;
-
use crate::cob::{op, ActorId, Embed, EntryId, Op};
+
use crate::cob::{ActorId, Embed, EntryId, Op, op};
use crate::git;
use crate::prelude::ReadRepository;

@@ -633,8 +633,8 @@ mod tests {
    use crate as radicle;
    use crate::cob::store::Cob;
    use crate::cob::test;
-
    use crate::crypto::test::signer::MockSigner;
    use crate::crypto::Signer;
+
    use crate::crypto::test::signer::MockSigner;
    use crate::node::device::Device;
    use crate::profile::env;
    use crate::test::arbitrary;
modified crates/radicle/src/git.rs
@@ -6,7 +6,7 @@ use std::path::Path;
use std::process::Command;
use std::str::FromStr;

-
pub use radicle_oid::{str::ParseOidError, Oid};
+
pub use radicle_oid::{Oid, str::ParseOidError};

pub extern crate radicle_git_ref_format as fmt;

@@ -705,20 +705,12 @@ pub fn set_upstream(
    let branch_remote = format!("branch.{branch}.remote");
    let branch_merge = format!("branch.{branch}.merge");

-
    config.remove_multivar(&branch_remote, ".*").or_else(|e| {
-
        if e.is_not_found() {
-
            Ok(())
-
        } else {
-
            Err(e)
-
        }
-
    })?;
-
    config.remove_multivar(&branch_merge, ".*").or_else(|e| {
-
        if e.is_not_found() {
-
            Ok(())
-
        } else {
-
            Err(e)
-
        }
-
    })?;
+
    config
+
        .remove_multivar(&branch_remote, ".*")
+
        .or_else(|e| if e.is_not_found() { Ok(()) } else { Err(e) })?;
+
    config
+
        .remove_multivar(&branch_merge, ".*")
+
        .or_else(|e| if e.is_not_found() { Ok(()) } else { Err(e) })?;
    config.set_multivar(&branch_remote, ".*", remote)?;
    config.set_multivar(&branch_merge, ".*", merge)?;

@@ -768,7 +760,7 @@ pub mod process {

    use crate::storage::ReadRepository;

-
    use super::{run, Oid, Verbosity};
+
    use super::{Oid, Verbosity, run};

    /// Perform a local fetch, from storage using `git fetch-pack`.
    ///
modified crates/radicle/src/git/canonical/convergence.rs
@@ -3,7 +3,7 @@ use std::{fmt, ops::ControlFlow};
use crate::git::Oid;
use crate::prelude::Did;

-
use super::{effects, error, Object};
+
use super::{Object, effects, error};

/// Checks for convergence and ensures that compared objects are of the same
/// type, i.e. commit or tag, to the [`Candidate`].
modified crates/radicle/src/git/canonical/effects.rs
@@ -1,9 +1,9 @@
use std::collections::{BTreeMap, BTreeSet};

use crate::git;
+
use crate::git::Oid;
use crate::git::fmt::Qualified;
use crate::git::raw::ErrorExt as _;
-
use crate::git::Oid;
use crate::prelude::Did;

use super::{FoundObjects, GraphAheadBehind, MergeBase, Object};
modified crates/radicle/src/git/canonical/error.rs
@@ -2,20 +2,26 @@ use thiserror::Error;

use crate::git::Oid;

-
use super::{effects, ObjectType};
+
use super::{ObjectType, effects};
pub use effects::{FindObjectsError, MergeBaseError};

#[derive(Debug, Error)]
pub enum QuorumError {
-
    #[error("could not determine target for canonical reference '{refname}', found objects of different types")]
+
    #[error(
+
        "could not determine target for canonical reference '{refname}', found objects of different types"
+
    )]
    DifferentTypes { refname: String },
    #[error(transparent)]
    Convergence(#[from] ConvergesError),
    #[error(transparent)]
    MergeBase(#[from] MergeBaseError),
-
    #[error("could not determine target for canonical reference '{refname}', no object with at least {threshold} vote(s) found (threshold not met)")]
+
    #[error(
+
        "could not determine target for canonical reference '{refname}', no object with at least {threshold} vote(s) found (threshold not met)"
+
    )]
    NoCandidates { refname: String, threshold: usize },
-
    #[error("could not determine target commit for canonical reference '{refname}', found diverging commits {longest} and {head}, with base commit {base} and threshold {threshold}")]
+
    #[error(
+
        "could not determine target commit for canonical reference '{refname}', found diverging commits {longest} and {head}, with base commit {base} and threshold {threshold}"
+
    )]
    DivergingCommits {
        refname: String,
        threshold: usize,
@@ -23,7 +29,9 @@ pub enum QuorumError {
        longest: Oid,
        head: Oid,
    },
-
    #[error("could not determine target tag for canonical reference '{refname}', found multiple candidates with threshold {threshold}")]
+
    #[error(
+
        "could not determine target tag for canonical reference '{refname}', found multiple candidates with threshold {threshold}"
+
    )]
    DivergingTags {
        refname: String,
        threshold: usize,
modified crates/radicle/src/git/canonical/quorum.rs
@@ -239,7 +239,7 @@ pub enum CommitQuorumFailure {
#[allow(clippy::unwrap_used)]
#[cfg(test)]
mod test {
-
    use crate::git::{canonical::MergeBase, Oid};
+
    use crate::git::{Oid, canonical::MergeBase};

    use super::MergeBases;

modified crates/radicle/src/git/canonical/rules.rs
@@ -22,10 +22,10 @@ use thiserror::Error;
use crate::git;
use crate::git::canonical;
use crate::git::canonical::Canonical;
-
use crate::git::fmt::refspec::QualifiedPattern;
use crate::git::fmt::Qualified;
-
use crate::git::fmt::{refname, RefString};
-
use crate::identity::{doc, Did};
+
use crate::git::fmt::refspec::QualifiedPattern;
+
use crate::git::fmt::{RefString, refname};
+
use crate::identity::{Did, doc};

const ASTERISK: char = '*';

@@ -745,18 +745,18 @@ mod tests {

    use nonempty::nonempty;

-
    use crate::crypto::{test::signer::MockSigner, Signer};
+
    use crate::Storage;
+
    use crate::crypto::{Signer, test::signer::MockSigner};
    use crate::git;
-
    use crate::git::fmt::qualified_pattern;
    use crate::git::fmt::RefString;
-
    use crate::identity::doc::Doc;
+
    use crate::git::fmt::qualified_pattern;
    use crate::identity::Visibility;
+
    use crate::identity::doc::Doc;
    use crate::node::device::Device;
    use crate::rad;
    use crate::storage::refs::{IDENTITY_BRANCH, IDENTITY_ROOT, SIGREFS_BRANCH, SIGREFS_PARENT};
-
    use crate::storage::{git::transport, ReadStorage};
+
    use crate::storage::{ReadStorage, git::transport};
    use crate::test::{arbitrary, fixtures};
-
    use crate::Storage;

    use super::*;

@@ -994,7 +994,9 @@ mod tests {

        assert_eq!(
            patterns,
-
            [pattern05, pattern06, pattern03, pattern02, pattern04, pattern01]
+
            [
+
                pattern05, pattern06, pattern03, pattern02, pattern04, pattern01
+
            ]
        );
    }

modified crates/radicle/src/git/raw.rs
@@ -6,7 +6,7 @@

// Re-exports that are only used within this crate.
pub(crate) use git2::{
-
    message_trailers_strs, AutotagOption, Blob, FetchOptions, FetchPrune, Object, Revwalk, Sort,
+
    AutotagOption, Blob, FetchOptions, FetchPrune, Object, Revwalk, Sort, message_trailers_strs,
};

#[cfg(unix)]
@@ -35,7 +35,7 @@ pub mod build {

pub(crate) mod transport {
    pub use git2::transport::{
-
        register, Service, SmartSubtransport, SmartSubtransportStream, Transport,
+
        Service, SmartSubtransport, SmartSubtransportStream, Transport, register,
    };
}

modified crates/radicle/src/identity/crefs.rs
@@ -1,8 +1,8 @@
use serde::{Deserialize, Serialize};

use crate::git::canonical::{
-
    rules::{self, RawRules, Rules, ValidationError},
    ValidRule,
+
    rules::{self, RawRules, Rules, ValidationError},
};

use super::doc::{Delegates, Payload};
modified crates/radicle/src/identity/doc.rs
@@ -11,7 +11,7 @@ use std::sync::LazyLock;
use crate::git::Oid;
use nonempty::NonEmpty;
use radicle_cob::type_name::{TypeName, TypeNameParse};
-
use serde::{de, Deserialize, Serialize};
+
use serde::{Deserialize, Serialize, de};
use thiserror::Error;

use crate::canonical::formatter::CanonicalFormatter;
@@ -21,7 +21,7 @@ use crate::crypto::Signature;
use crate::git;
use crate::git::canonical::rules;
use crate::git::raw::ErrorExt as _;
-
use crate::identity::{project::Project, Did};
+
use crate::identity::{Did, project::Project};
use crate::node::device::Device;
use crate::storage;
use crate::storage::{ReadRepository, RepositoryError};
@@ -29,8 +29,8 @@ use crate::storage::{ReadRepository, RepositoryError};
pub use crypto::PublicKey;
pub use radicle_core::repo::*;

-
use super::crefs::{self, RawCanonicalRefs};
use super::CanonicalRefs;
+
use super::crefs::{self, RawCanonicalRefs};

/// Path to the identity document in the identity branch.
pub static PATH: LazyLock<&Path> = LazyLock::new(|| Path::new("radicle.json"));
@@ -974,8 +974,8 @@ mod test {

    use crate::assert_matches;
    use crate::rad;
-
    use crate::storage::git::transport;
    use crate::storage::git::Storage;
+
    use crate::storage::git::transport;
    use crate::storage::{ReadStorage as _, RemoteId, WriteStorage as _};
    use crate::test::arbitrary;
    use crate::test::arbitrary::r#gen;
modified crates/radicle/src/identity/doc/update.rs
@@ -8,7 +8,7 @@ use crate::{
    git,
    identity::crefs::GetCanonicalRefs as _,
    prelude::Did,
-
    storage::{self, refs, ReadRepository, RepositoryError},
+
    storage::{self, ReadRepository, RepositoryError, refs},
};

use super::{Doc, PayloadError, PayloadId, RawDoc, Visibility};
@@ -206,7 +206,7 @@ pub fn verify(raw: RawDoc) -> Result<Doc, error::DocVerification> {
            return Err(error::DocVerification::PayloadError {
                id: PayloadId::project(),
                err: e.to_string(),
-
            })
+
            });
        }
    };
    // Ensure that if we have canonical reference rules and a project, that no
@@ -279,7 +279,7 @@ mod test {
        git,
        identity::{
            crefs::GetCanonicalRefs,
-
            doc::{update::error, PayloadId},
+
            doc::{PayloadId, update::error},
        },
        prelude::RawDoc,
        test::arbitrary,
modified crates/radicle/src/identity/doc/update/error.rs
@@ -2,7 +2,7 @@ use thiserror::Error;

use crate::git;
use crate::git::fmt::RefString;
-
use crate::identity::{doc::PayloadId, Did, DocError};
+
use crate::identity::{Did, DocError, doc::PayloadId};

#[derive(Debug, Error)]
#[error("'{0}' is not a valid visibility type")]
@@ -28,7 +28,9 @@ pub enum DocVerification {
    PayloadError { id: PayloadId, err: String },
    #[error(transparent)]
    Doc(#[from] DocError),
-
    #[error("incompatible payloads: The rule(s) xyz.radicle.crefs.rules.{matches:?} matches the value of xyz.radicle.project.defaultBranch ('{default}'). Possible resolutions: Change the name of the default branch or remove the rule(s).")]
+
    #[error(
+
        "incompatible payloads: The rule(s) xyz.radicle.crefs.rules.{matches:?} matches the value of xyz.radicle.project.defaultBranch ('{default}'). Possible resolutions: Change the name of the default branch or remove the rule(s)."
+
    )]
    DisallowDefault {
        matches: Vec<String>,
        default: git::fmt::Qualified<'static>,
modified crates/radicle/src/identity/project.rs
@@ -1,8 +1,8 @@
use std::{fmt, str::FromStr};

use serde::{
-
    de::{self, MapAccess, Visitor},
    Deserialize, Serialize,
+
    de::{self, MapAccess, Visitor},
};
use thiserror::Error;

modified crates/radicle/src/io.rs
@@ -1,7 +1,7 @@
use std::io;

#[cfg(unix)]
-
use libc::{getrlimit, rlim_t, rlimit, setrlimit, RLIMIT_NOFILE};
+
use libc::{RLIMIT_NOFILE, getrlimit, rlim_t, rlimit, setrlimit};

#[cfg(unix)]
type Int = rlim_t;
modified crates/radicle/src/lib.rs
@@ -44,7 +44,7 @@ pub mod prelude {

    pub use crypto::PublicKey;
    pub use git::BranchName;
-
    pub use identity::{project::Project, Did, Doc, RawDoc, RepoId};
+
    pub use identity::{Did, Doc, RawDoc, RepoId, project::Project};
    pub use node::{Alias, NodeId, Timestamp};
    pub use profile::Profile;
    pub use storage::{ReadRepository, ReadStorage, SignRepository, WriteRepository, WriteStorage};
modified crates/radicle/src/node.rs
@@ -43,11 +43,11 @@ use crate::crypto::PublicKey;
use crate::git;
use crate::identity::RepoId;
use crate::profile;
-
use crate::storage::refs::{FeatureLevel, RefsAt};
use crate::storage::RefUpdate;
+
use crate::storage::refs::{FeatureLevel, RefsAt};

pub use address::KnownAddress;
-
pub use command::{Command, CommandResult, ConnectOptions, Success, DEFAULT_TIMEOUT};
+
pub use command::{Command, CommandResult, ConnectOptions, DEFAULT_TIMEOUT, Success};
pub use config::Config;
pub use cyphernet::addr::{HostName, PeerAddr, PeerAddrParseError};
pub use db::Database;
@@ -1049,7 +1049,7 @@ impl<T: DeserializeOwned> Iterator for LineIter<T> {
                        return Some(Err(Error::InvalidJson {
                            response: l.clone(),
                            error: e,
-
                        }))
+
                        }));
                    }
                    Ok(result) => result,
                };
modified crates/radicle/src/node/address/store.rs
@@ -8,8 +8,8 @@ use sqlite as sql;
use thiserror::Error;

use crate::node;
-
use crate::node::address::{AddressType, KnownAddress, Node, Source};
use crate::node::UserAgent;
+
use crate::node::address::{AddressType, KnownAddress, Node, Source};
use crate::node::{Address, Alias, AliasError, AliasStore, Database, NodeId, Penalty, Severity};
use crate::prelude::Timestamp;
use crate::sql::transaction;
modified crates/radicle/src/node/command.rs
@@ -17,8 +17,8 @@ use crate::crypto::PublicKey;
use crate::identity::RepoId;
use crate::storage::refs;

-
use super::events::Event;
use super::NodeId;
+
use super::events::Event;

/// Default timeout when waiting for the node to respond with data.
pub const DEFAULT_TIMEOUT: time::Duration = time::Duration::from_secs(30);
modified crates/radicle/src/node/config.rs
@@ -22,7 +22,7 @@ pub type ProtocolVersion = u8;
pub mod seeds {
    use std::{str::FromStr, sync::LazyLock};

-
    use cyphernet::addr::{tor::OnionAddrV3, HostName, NetAddr};
+
    use cyphernet::addr::{HostName, NetAddr, tor::OnionAddrV3};

    use super::{ConnectAddress, NodeId, PeerAddr};

@@ -767,7 +767,7 @@ wrapper!(
#[allow(clippy::unwrap_used)]
mod test {
    use super::{DefaultSeedingPolicy, Scope};
-
    use crate::node::{policy, Alias};
+
    use crate::node::{Alias, policy};
    use serde_json::json;

    #[test]
modified crates/radicle/src/node/db.rs
@@ -16,7 +16,7 @@ use sqlite as sql;
use thiserror::Error;

use crate::node::{
-
    address, Address, Alias, Features, KnownAddress, NodeId, Timestamp, UserAgent, PROTOCOL_VERSION,
+
    Address, Alias, Features, KnownAddress, NodeId, PROTOCOL_VERSION, Timestamp, UserAgent, address,
};
use crate::sql::transaction;

modified crates/radicle/src/node/device.rs
@@ -2,9 +2,9 @@ use std::fmt;
use std::ops::Deref;

use crypto::{
+
    Signature,
    signature::{Keypair, KeypairRef, Signer, Verifier},
    ssh::ExtendedSignature,
-
    Signature,
};

use crate::crypto;
modified crates/radicle/src/node/events.rs
@@ -9,11 +9,11 @@ use std::time;

use crossbeam_channel as chan;

-
use crate::git::fmt::Qualified;
use crate::git::Oid;
+
use crate::git::fmt::Qualified;
use crate::node;
use crate::prelude::*;
-
use crate::storage::{refs, RefUpdate};
+
use crate::storage::{RefUpdate, refs};

/// Maximum unconsumed events allowed per subscription.
pub const MAX_PENDING_EVENTS: usize = 8192;
modified crates/radicle/src/node/features.rs
@@ -116,13 +116,17 @@ mod test {
    fn test_operations() {
        assert_eq!(Features::NONE.with(Features::SEED), Features::SEED);

-
        assert!(!Features::from(u64::MAX)
-
            .without(Features::SEED)
-
            .has(Features::SEED));
+
        assert!(
+
            !Features::from(u64::MAX)
+
                .without(Features::SEED)
+
                .has(Features::SEED)
+
        );

-
        assert!(Features::from(u64::MIN)
-
            .with(Features::SEED)
-
            .has(Features::SEED));
+
        assert!(
+
            Features::from(u64::MIN)
+
                .with(Features::SEED)
+
                .has(Features::SEED)
+
        );

        assert_eq!(
            Features::NONE.with(Features::SEED).without(Features::SEED),
modified crates/radicle/src/node/notifications.rs
@@ -7,7 +7,7 @@ use thiserror::Error;

use crate::cob;
use crate::cob::TypedId;
-
use crate::git::{fmt::Qualified, BranchName};
+
use crate::git::{BranchName, fmt::Qualified};
use crate::prelude::RepoId;
use crate::storage::{RefUpdate, RemoteId};

modified crates/radicle/src/node/notifications/store.rs
@@ -10,9 +10,9 @@ use sqlite as sql;
use thiserror::Error;

use crate::git;
-
use crate::git::fmt::RefString;
use crate::git::Oid;
use crate::git::RefError;
+
use crate::git::fmt::RefString;
use crate::prelude::RepoId;
use crate::sql::transaction;
use crate::storage::RefUpdate;
@@ -578,9 +578,10 @@ mod test {
        assert!(db.insert(&repo, &update1, time).unwrap());
        assert!(db.insert(&repo, &update2, time).unwrap());
        assert!(db.insert(&repo, &update3, time).unwrap());
-
        assert!(db
-
            .set_status(NotificationStatus::ReadAt(time), &[1, 2, 3])
-
            .unwrap());
+
        assert!(
+
            db.set_status(NotificationStatus::ReadAt(time), &[1, 2, 3])
+
                .unwrap()
+
        );

        let mut notifs = db.by_repo(&repo, "timestamp").unwrap();

@@ -619,9 +620,10 @@ mod test {
            new: master2,
        };
        assert!(db.insert(&repo, &update1, time1).unwrap());
-
        assert!(db
-
            .set_status(NotificationStatus::ReadAt(time1), &[1])
-
            .unwrap());
+
        assert!(
+
            db.set_status(NotificationStatus::ReadAt(time1), &[1])
+
                .unwrap()
+
        );
        assert!(db.insert(&repo, &update2, time2).unwrap());

        let mut notifs = db.by_repo(&repo, "timestamp").unwrap();
modified crates/radicle/src/node/refs/store.rs
@@ -6,8 +6,8 @@ use localtime::LocalTime;
use sqlite as sql;
use thiserror::Error;

-
use crate::git::fmt::Qualified;
use crate::git::Oid;
+
use crate::git::fmt::Qualified;
use crate::node::Database;
use crate::node::NodeId;
use crate::prelude::RepoId;
@@ -195,15 +195,17 @@ mod test {
        assert!(db.is_empty().unwrap());
        assert_eq!(db.count().unwrap(), 0);

-
        assert!(db
-
            .set(&repo, &namespace, &refname1, oid, timestamp)
-
            .unwrap());
+
        assert!(
+
            db.set(&repo, &namespace, &refname1, oid, timestamp)
+
                .unwrap()
+
        );
        assert!(!db.is_empty().unwrap());
        assert_eq!(db.count().unwrap(), 1);

-
        assert!(db
-
            .set(&repo, &namespace, &refname2, oid, timestamp)
-
            .unwrap());
+
        assert!(
+
            db.set(&repo, &namespace, &refname2, oid, timestamp)
+
                .unwrap()
+
        );
        assert_eq!(db.count().unwrap(), 2);
    }

@@ -238,21 +240,24 @@ mod test {
        let mut timestamp = LocalTime::now();

        assert_eq!(db.get(&repo, &namespace, &refname).unwrap(), None);
-
        assert!(db
-
            .set(&repo, &namespace, &refname, oid1, timestamp)
-
            .unwrap());
+
        assert!(
+
            db.set(&repo, &namespace, &refname, oid1, timestamp)
+
                .unwrap()
+
        );
        assert_eq!(
            db.get(&repo, &namespace, &refname).unwrap(),
            Some((oid1, timestamp))
        );
-
        assert!(!db
-
            .set(&repo, &namespace, &refname, oid1, timestamp)
-
            .unwrap());
+
        assert!(
+
            !db.set(&repo, &namespace, &refname, oid1, timestamp)
+
                .unwrap()
+
        );
        timestamp.elapse(LocalDuration::from_millis(1));

-
        assert!(db
-
            .set(&repo, &namespace, &refname, oid2, timestamp)
-
            .unwrap());
+
        assert!(
+
            db.set(&repo, &namespace, &refname, oid2, timestamp)
+
                .unwrap()
+
        );
        assert_eq!(
            db.get(&repo, &namespace, &refname).unwrap(),
            Some((oid2, timestamp))
modified crates/radicle/src/node/routing.rs
@@ -320,11 +320,12 @@ mod test {
        let mut db = database(":memory:");

        for node in &nodes {
-
            assert!(db
-
                .add_inventory(&ids, *node, Timestamp::EPOCH)
-
                .unwrap()
-
                .iter()
-
                .all(|(_, r)| *r == InsertResult::SeedAdded));
+
            assert!(
+
                db.add_inventory(&ids, *node, Timestamp::EPOCH)
+
                    .unwrap()
+
                    .iter()
+
                    .all(|(_, r)| *r == InsertResult::SeedAdded)
+
            );
        }

        let results = db.entries().unwrap().collect::<Vec<_>>();
modified crates/radicle/src/node/seed/store.rs
@@ -6,10 +6,10 @@ use sqlite as sql;
use thiserror::Error;

use crate::git::Oid;
+
use crate::node::NodeId;
use crate::node::address;
use crate::node::address::Store as _;
-
use crate::node::NodeId;
-
use crate::node::{seed::SyncedSeed, Database, SyncedAt};
+
use crate::node::{Database, SyncedAt, seed::SyncedSeed};
use crate::prelude::{RepoId, Timestamp};

#[derive(Error, Debug)]
modified crates/radicle/src/node/timestamp.rs
@@ -76,11 +76,7 @@ impl TryFrom<u64> for Timestamp {
    type Error = u64;

    fn try_from(u: u64) -> Result<Self, u64> {
-
        if u <= *Self::MAX {
-
            Ok(Self(u))
-
        } else {
-
            Err(u)
-
        }
+
        if u <= *Self::MAX { Ok(Self(u)) } else { Err(u) }
    }
}

modified crates/radicle/src/profile.rs
@@ -22,18 +22,18 @@ use localtime::LocalTime;
use thiserror::Error;

use crate::cob::migrate;
-
use crate::crypto::ssh::agent::Agent;
-
use crate::crypto::ssh::{keystore, Keystore, Passphrase};
use crate::crypto::PublicKey;
+
use crate::crypto::ssh::agent::Agent;
+
use crate::crypto::ssh::{Keystore, Passphrase, keystore};
use crate::node::device::{BoxedDevice, Device};
use crate::node::policy::config::store::Read;
use crate::node::{
-
    notifications, policy, policy::Scope, Alias, AliasStore, Handle as _, Node, UserAgent,
+
    Alias, AliasStore, Handle as _, Node, UserAgent, notifications, policy, policy::Scope,
};
use crate::prelude::{Did, NodeId, RepoId};
-
use crate::storage::git::transport;
-
use crate::storage::git::Storage;
use crate::storage::ReadRepository;
+
use crate::storage::git::Storage;
+
use crate::storage::git::transport;
use crate::{cob, git, node, storage};

/// Environment variables used by radicle.
@@ -496,8 +496,7 @@ pub fn home() -> Result<Home, io::Error> {
        "Environment variables `RAD_HOME` and `HOME` are both unset or not valid Unicode.";

    #[cfg(windows)]
-
    const ERROR_MESSAGE_UNSET: &str =
-
        "Environment variables `RAD_HOME`, `HOME`, and `USERPROFILE` are all unset or not valid Unicode.";
+
    const ERROR_MESSAGE_UNSET: &str = "Environment variables `RAD_HOME`, `HOME`, and `USERPROFILE` are all unset or not valid Unicode.";

    struct DetectedHome {
        path: String,
modified crates/radicle/src/profile/config.rs
@@ -7,9 +7,9 @@ use serde_json as json;
use thiserror::Error;

use crate::explorer::Explorer;
+
use crate::node::Alias;
use crate::node::config::DefaultSeedingPolicy;
use crate::node::policy::{Policy, Scope};
-
use crate::node::Alias;
use crate::{cli, node, web};

#[derive(Debug, Error)]
@@ -112,7 +112,9 @@ pub enum InitError {

#[derive(Debug, Error)]
pub enum LoadError {
-
    #[error("failed to open configuration file {path:?}: {err}, perhaps you need to initialise one `rad config init --alias <alias>`")]
+
    #[error(
+
        "failed to open configuration file {path:?}: {err}, perhaps you need to initialise one `rad config init --alias <alias>`"
+
    )]
    File {
        path: PathBuf,
        #[source]
@@ -380,13 +382,11 @@ impl RawConfig {
        let mut current = &mut self.0;
        for key in config_path.iter() {
            current = match current {
-
                json::Value::Object(map) => {
-
                    map.entry(key).or_insert_with(|| json::json!({}))
-
                }
+
                json::Value::Object(map) => map.entry(key).or_insert_with(|| json::json!({})),
                _ => {
                    return Err(ModifyError::Upsert {
                        key: key.to_owned(),
-
                    })
+
                    });
                }
            }
        }
modified crates/radicle/src/rad.rs
@@ -13,10 +13,10 @@ use crate::identity::doc;
use crate::identity::doc::{DocError, RepoId, Visibility};
use crate::identity::project::{Project, ProjectName};
use crate::node::device::Device;
-
use crate::storage::git::transport;
+
use crate::storage::RepositoryError;
use crate::storage::git::Repository;
+
use crate::storage::git::transport;
use crate::storage::refs::SignedRefs;
-
use crate::storage::RepositoryError;
use crate::storage::{ReadRepository as _, RemoteId, SignRepository as _};
use crate::storage::{WriteRepository, WriteStorage};
use crate::{identity, storage};
@@ -230,7 +230,9 @@ where
pub enum CheckoutError {
    #[error("failed to fetch to working copy: {0}")]
    FetchIo(#[source] std::io::Error),
-
    #[error("internal fetch failed with exit status {status}, stderr and stdout follow:\n{stderr}\n{stdout}")]
+
    #[error(
+
        "internal fetch failed with exit status {status}, stderr and stdout follow:\n{stderr}\n{stdout}"
+
    )]
    FetchGit {
        status: std::process::ExitStatus,
        stderr: String,
@@ -510,8 +512,8 @@ mod tests {
    use pretty_assertions::assert_eq;

    use crate::identity::Did;
-
    use crate::storage::git::transport;
    use crate::storage::git::Storage;
+
    use crate::storage::git::transport;
    use crate::storage::{ReadStorage, RemoteRepository as _};
    use crate::test::fixtures;
    use git::fmt::{component, qualified};
modified crates/radicle/src/serde_ext.rs
@@ -9,7 +9,7 @@ pub mod string {
    use std::fmt::Display;
    use std::str::FromStr;

-
    use serde::{de, Deserialize, Deserializer, Serializer};
+
    use serde::{Deserialize, Deserializer, Serializer, de};

    pub fn serialize<T, S>(value: &T, serializer: S) -> Result<S::Ok, S::Error>
    where
modified crates/radicle/src/storage.rs
@@ -1,7 +1,7 @@
pub mod git;
pub mod refs;

-
use std::collections::{hash_map, HashSet};
+
use std::collections::{HashSet, hash_map};
use std::ops::Deref;
use std::path::{Path, PathBuf};
use std::{fmt, io};
@@ -16,15 +16,15 @@ pub use git::{Validation, Validations};

use crate::cob;
use crate::collections::RandomMap;
+
use crate::git::RefError;
use crate::git::canonical;
-
use crate::git::fmt::{refspec::PatternString, refspec::Refspec, Qualified, RefStr, RefString};
+
use crate::git::fmt::{Qualified, RefStr, RefString, refspec::PatternString, refspec::Refspec};
use crate::git::raw::ErrorExt as _;
-
use crate::git::RefError;
-
use crate::identity::{doc, Did, PayloadError};
+
use crate::identity::{Did, PayloadError, doc};
use crate::identity::{Doc, DocAt, DocError};
use crate::identity::{Identity, RepoId};
-
use crate::node::device::Device;
use crate::node::SyncedAt;
+
use crate::node::device::Device;
use crate::storage::git::NAMESPACES_GLOB;
use crate::storage::refs::{FeatureLevel, Refs, SignedRefs};

modified crates/radicle/src/storage/git.rs
@@ -19,21 +19,21 @@ use crate::identity::{CanonicalRefs, Doc, DocAt, RepoId};
use crate::identity::{Identity, Project};
use crate::node::device::Device;
use crate::storage::refs::{FeatureLevel, Refs, SignedRefs};
-
use crate::storage::{refs, SignedRefsInfo};
use crate::storage::{
    ReadRepository, ReadStorage, Remote, Remotes, RepositoryInfo, SetHead, SignRepository,
    WriteRepository, WriteStorage,
};
+
use crate::storage::{SignedRefsInfo, refs};
use crate::{git, git::Oid, node};

-
use crate::git::fmt::{
-
    refname, refspec, refspec::PatternStr, refspec::PatternString, Qualified, RefString,
-
};
use crate::git::RefError;
use crate::git::UserInfo;
+
use crate::git::fmt::{
+
    Qualified, RefString, refname, refspec, refspec::PatternStr, refspec::PatternString,
+
};
pub use crate::storage::{Error, RepositoryError};

-
use super::refs::{sigrefs, RefsAt};
+
use super::refs::{RefsAt, sigrefs};
use super::{RemoteId, RemoteRepository, ValidateRepository};

pub static NAMESPACES_GLOB: LazyLock<PatternString> =
modified crates/radicle/src/storage/git/cob.rs
@@ -16,18 +16,18 @@ use crate::git::fmt::*;
use crate::git::*;
use crate::identity;
use crate::identity::doc::DocError;
-
use crate::node::device::Device;
use crate::node::NodeId;
+
use crate::node::device::Device;
use crate::storage;
use crate::storage::Error;
use crate::storage::{
-
    git::{Remote, Remotes, Validations},
    ReadRepository,
+
    git::{Remote, Remotes, Validations},
};

use super::{RemoteId, Repository};

-
pub use crate::cob::{store, ObjectId, Store};
+
pub use crate::cob::{ObjectId, Store, store};

#[derive(Error, Debug)]
pub enum ObjectsError {
modified crates/radicle/src/storage/git/transport/local/url.rs
@@ -123,16 +123,22 @@ mod test {
        assert_eq!(url.repo, repo);
        assert_eq!(url.namespace, Some(namespace));

-
        assert!(format!("heartwood://{}", repo.canonical())
-
            .parse::<Url>()
-
            .is_err());
-
        assert!(format!("git://{}", repo.canonical())
-
            .parse::<Url>()
-
            .is_err());
+
        assert!(
+
            format!("heartwood://{}", repo.canonical())
+
                .parse::<Url>()
+
                .is_err()
+
        );
+
        assert!(
+
            format!("git://{}", repo.canonical())
+
                .parse::<Url>()
+
                .is_err()
+
        );
        assert!(format!("rad://{namespace}").parse::<Url>().is_err());
-
        assert!(format!("rad://{}/{namespace}/fnord", repo.canonical())
-
            .parse::<Url>()
-
            .is_err());
+
        assert!(
+
            format!("rad://{}/{namespace}/fnord", repo.canonical())
+
                .parse::<Url>()
+
                .is_err()
+
        );
    }

    #[test]
modified crates/radicle/src/storage/git/transport/remote/mock.rs
@@ -9,8 +9,8 @@ use std::{process, thread};

use super::Url;
use crate::git;
-
use crate::storage::git::transport::ChildStream;
use crate::storage::RemoteId;
+
use crate::storage::git::transport::ChildStream;

/// Nodes registered with the mock transport.
static NODES: LazyLock<Mutex<HashMap<(ThreadId, RemoteId), PathBuf>>> =
modified crates/radicle/src/storage/git/transport/remote/url.rs
@@ -130,9 +130,11 @@ mod test {

        assert!(format!("heartwood://{node}").parse::<Url>().is_err());
        assert!(format!("rad://{node}").parse::<Url>().is_err());
-
        assert!(format!("heartwood://{node}/{namespace}")
-
            .parse::<Url>()
-
            .is_err());
+
        assert!(
+
            format!("heartwood://{node}/{namespace}")
+
                .parse::<Url>()
+
                .is_err()
+
        );
        assert!(
            format!("heartwood://{node}/{}/{namespace}/fnord", repo.canonical())
                .parse::<Url>()
modified crates/radicle/src/storage/refs.rs
@@ -17,11 +17,11 @@ use serde::{Deserialize, Serialize};
use thiserror::Error;

use crate::git;
-
use crate::git::raw::ErrorExt as _;
use crate::git::Oid;
+
use crate::git::raw::ErrorExt as _;
use crate::storage;
-
use crate::storage::refs::sigrefs::read::Tip;
use crate::storage::RemoteId;
+
use crate::storage::refs::sigrefs::read::Tip;

pub use crate::git::refs::storage::*;

@@ -495,13 +495,13 @@ pub mod canonical {
#[allow(clippy::unwrap_used)]
mod tests {
    use qcheck_macros::quickcheck;
-
    use storage::{git::transport, RemoteRepository, SignRepository, WriteStorage};
+
    use storage::{RemoteRepository, SignRepository, WriteStorage, git::transport};

    use super::*;
    use crate::assert_matches;
    use crate::node::device::Device;
    use crate::storage::WriteRepository as _;
-
    use crate::{cob::identity::Identity, cob::Title, rad, test::fixtures, Storage};
+
    use crate::{Storage, cob::Title, cob::identity::Identity, rad, test::fixtures};

    #[quickcheck]
    fn prop_canonical_roundtrip(refs: Refs) {
modified crates/radicle/src/storage/refs/sigrefs/git.rs
@@ -41,8 +41,8 @@ impl Committer {
        #[cfg(not(any(test, feature = "test")))]
        {
            use crate::profile::env::GIT_COMMITTER_DATE;
-
            use std::env::var;
            use std::env::VarError;
+
            use std::env::var;

            let timestamp = match var(GIT_COMMITTER_DATE) {
                Ok(s) => match s.trim().parse::<u64>() {
@@ -147,7 +147,7 @@ mod git2_impls {
            let commit = match self.find_commit(git2::Oid::from(*oid)) {
                Ok(c) => c,
                Err(e) if e.code() == git2::ErrorCode::NotFound => {
-
                    return Err(ReadBlob::commit_not_found_error(*oid))
+
                    return Err(ReadBlob::commit_not_found_error(*oid));
                }
                Err(e) => return Err(ReadBlob::other(e)),
            };
modified crates/radicle/src/storage/refs/sigrefs/property.rs
@@ -3,14 +3,14 @@
mod mock;
use mock::*;

-
use crypto::test::signer::MockSigner;
use crypto::Signer as _;
+
use crypto::test::signer::MockSigner;
use qcheck::TestResult;
use qcheck_macros::quickcheck;

+
use crate::storage::refs::Refs;
use crate::storage::refs::sigrefs::read::{SignedRefsReader, Tip};
use crate::storage::refs::sigrefs::write::{SignedRefsWriter, Update};
-
use crate::storage::refs::Refs;

#[quickcheck]
fn roundtrip(BoundedVec(all_refs): BoundedVec<Refs>) -> TestResult {
modified crates/radicle/src/storage/refs/sigrefs/property/mock.rs
@@ -6,7 +6,7 @@ use tempfile::TempDir;

use crate::identity::doc;
use crate::storage::refs::sigrefs::git::Committer;
-
use crate::storage::refs::{Refs, IDENTITY_ROOT};
+
use crate::storage::refs::{IDENTITY_ROOT, Refs};

/// A `Vec<T>` whose [`Arbitrary`] instance caps the length at
/// [`Self::MAX_LEN`], preventing the property runner from generating inputs
modified crates/radicle/src/storage/refs/sigrefs/read.rs
@@ -9,7 +9,7 @@ use std::collections::{BTreeMap, HashMap};
use std::num::NonZeroUsize;
use std::path::Path;

-
use crypto::{signature, PublicKey};
+
use crypto::{PublicKey, signature};
use nonempty::NonEmpty;
use radicle_core::{NodeId, RepoId};
use radicle_git_metadata::commit::CommitData;
@@ -19,8 +19,8 @@ use crate::git;
use crate::identity::doc;
use crate::storage::refs::sigrefs::git::{object, reference};
use crate::storage::refs::{
-
    FeatureLevel, Refs, SignedRefs, IDENTITY_ROOT, REFS_BLOB_PATH, SIGNATURE_BLOB_PATH,
-
    SIGREFS_BRANCH,
+
    FeatureLevel, IDENTITY_ROOT, REFS_BLOB_PATH, Refs, SIGNATURE_BLOB_PATH, SIGREFS_BRANCH,
+
    SignedRefs,
};

/// A `rad/sigrefs` that has passed the following verification checks:
@@ -422,7 +422,7 @@ impl Commit {
                    sigrefs_commit: self.oid,
                    expected,
                    actual,
-
                })
+
                });
            }
        };

modified crates/radicle/src/storage/refs/sigrefs/read/error.rs
@@ -8,7 +8,7 @@ use thiserror::Error;

use crate::storage::refs::sigrefs::git::{object, reference};
use crate::storage::refs::sigrefs::read::FeatureLevels;
-
use crate::storage::refs::{canonical, FeatureLevel};
+
use crate::storage::refs::{FeatureLevel, canonical};

#[derive(Debug, Error)]
#[non_exhaustive]
@@ -114,7 +114,9 @@ pub enum IdentityRoot {
pub enum Verify {
    #[error("failed to verify signature over signed references")]
    Signature(crypto::signature::Error),
-
    #[error("expected repository identity {expected}, but found {found} under commit '{identity_commit}' during verification of '{sigrefs_commit}")]
+
    #[error(
+
        "expected repository identity {expected}, but found {found} under commit '{identity_commit}' during verification of '{sigrefs_commit}"
+
    )]
    MismatchedIdentity {
        identity_commit: Oid,
        sigrefs_commit: Oid,
modified crates/radicle/src/storage/refs/sigrefs/read/iter.rs
@@ -2,7 +2,7 @@ use radicle_oid::Oid;

use crate::storage::refs::sigrefs::git::object;

-
use super::{error, Commit, CommitReader};
+
use super::{Commit, CommitReader, error};

pub(super) struct Walk<'a, R> {
    repository: &'a R,
modified crates/radicle/src/storage/refs/sigrefs/read/test/commit_reader.rs
@@ -1,8 +1,8 @@
use radicle_oid::Oid;

-
use crate::storage::refs::sigrefs::read::{error, SignedRefsReader, Tip};
-
use crate::storage::refs::sigrefs::VerifiedCommit;
use crate::storage::refs::IDENTITY_ROOT;
+
use crate::storage::refs::sigrefs::VerifiedCommit;
+
use crate::storage::refs::sigrefs::read::{SignedRefsReader, Tip, error};

use super::mock;
use super::mock::{AlwaysVerify, MockRepository};
modified crates/radicle/src/storage/refs/sigrefs/read/test/identity_root_reader.rs
@@ -2,11 +2,11 @@ use radicle_core::RepoId;
use radicle_oid::Oid;

use crate::git;
+
use crate::storage::refs::sigrefs::VerifiedCommit;
use crate::storage::refs::sigrefs::read::{
-
    error, IdentityRoot, IdentityRootReader, SignedRefsReader, Tip,
+
    IdentityRoot, IdentityRootReader, SignedRefsReader, Tip, error,
};
-
use crate::storage::refs::sigrefs::VerifiedCommit;
-
use crate::storage::refs::{Refs, IDENTITY_ROOT};
+
use crate::storage::refs::{IDENTITY_ROOT, Refs};

use super::mock;
use super::mock::{AlwaysVerify, MockRepository};
modified crates/radicle/src/storage/refs/sigrefs/read/test/mock.rs
@@ -6,15 +6,15 @@ use std::path::{Path, PathBuf};

use radicle_core::NodeId;
use radicle_git_metadata::author::{Author, Time};
+
use radicle_git_metadata::commit::CommitData;
use radicle_git_metadata::commit::headers::Headers;
use radicle_git_metadata::commit::trailers::OwnedTrailer;
-
use radicle_git_metadata::commit::CommitData;
use radicle_oid::Oid;

use crate::git;
use crate::identity::doc;
use crate::storage::refs::sigrefs::git::{object, reference};
-
use crate::storage::refs::{Refs, REFS_BLOB_PATH, SIGNATURE_BLOB_PATH, SIGREFS_BRANCH};
+
use crate::storage::refs::{REFS_BLOB_PATH, Refs, SIGNATURE_BLOB_PATH, SIGREFS_BRANCH};

pub(crate) const MOCKED_IDENTITY: u8 = 99u8;

modified crates/radicle/src/storage/refs/sigrefs/read/test/resolve_tip.rs
@@ -1,9 +1,9 @@
use super::mock;
use super::mock::{AlwaysVerify, MockRepository};
-
use crate::storage::refs::sigrefs::read::error;
-
use crate::storage::refs::sigrefs::read::Tip;
-
use crate::storage::refs::sigrefs::SignedRefsReader;
use crate::storage::refs::IDENTITY_ROOT;
+
use crate::storage::refs::sigrefs::SignedRefsReader;
+
use crate::storage::refs::sigrefs::read::Tip;
+
use crate::storage::refs::sigrefs::read::error;

#[test]
fn missing_sigrefs() {
modified crates/radicle/src/storage/refs/sigrefs/read/test/signed_refs_reader.rs
@@ -1,8 +1,8 @@
use radicle_oid::Oid;

-
use crate::storage::refs::sigrefs::read::error::{Read, Verify};
-
use crate::storage::refs::sigrefs::read::{error, FeatureLevels, SignedRefsReader, Tip};
use crate::storage::refs::sigrefs::VerifiedCommit;
+
use crate::storage::refs::sigrefs::read::error::{Read, Verify};
+
use crate::storage::refs::sigrefs::read::{FeatureLevels, SignedRefsReader, Tip, error};
use crate::storage::refs::{FeatureLevel, IDENTITY_ROOT, SIGREFS_PARENT};
use crate::{assert_matches, git};

modified crates/radicle/src/storage/refs/sigrefs/read/test/tree_reader.rs
@@ -1,8 +1,8 @@
use radicle_oid::Oid;

use crate::git;
-
use crate::storage::refs::sigrefs::read::{error, SignedRefsReader, Tip};
use crate::storage::refs::sigrefs::VerifiedCommit;
+
use crate::storage::refs::sigrefs::read::{SignedRefsReader, Tip, error};
use crate::storage::refs::{IDENTITY_ROOT, REFS_BLOB_PATH, SIGNATURE_BLOB_PATH};

use super::mock;
modified crates/radicle/src/storage/refs/sigrefs/write.rs
@@ -5,20 +5,20 @@ mod test;

use std::path::Path;

-
use crypto::signature::{self, Signer};
use crypto::PublicKey;
+
use crypto::signature::{self, Signer};
use radicle_core::{NodeId, RepoId};
use radicle_git_metadata::author::Author;
-
use radicle_git_metadata::commit::{headers::Headers, trailers::OwnedTrailer, CommitData};
+
use radicle_git_metadata::commit::{CommitData, headers::Headers, trailers::OwnedTrailer};
use radicle_oid::Oid;

use crate::git;
-
use crate::storage::refs::sigrefs::git::{object, reference, Committer};
-
use crate::storage::refs::sigrefs::read::CommitReader;
-
use crate::storage::refs::sigrefs::{read, VerifiedCommit};
use crate::storage::refs::SignedRefs;
+
use crate::storage::refs::sigrefs::git::{Committer, object, reference};
+
use crate::storage::refs::sigrefs::read::CommitReader;
+
use crate::storage::refs::sigrefs::{VerifiedCommit, read};
use crate::storage::refs::{
-
    FeatureLevel, Refs, IDENTITY_ROOT, REFS_BLOB_PATH, SIGNATURE_BLOB_PATH, SIGREFS_BRANCH,
+
    FeatureLevel, IDENTITY_ROOT, REFS_BLOB_PATH, Refs, SIGNATURE_BLOB_PATH, SIGREFS_BRANCH,
    SIGREFS_PARENT,
};

@@ -161,7 +161,7 @@ where

        let commit_writer = match head {
            Ok(Some(head)) if !force && head.is_unchanged(&refs) => {
-
                return Ok(Update::unchanged(head.verified))
+
                return Ok(Update::unchanged(head.verified));
            }
            Ok(Some(head)) => CommitWriter::with_parent(
                refs,
modified crates/radicle/src/storage/refs/sigrefs/write/test/commit_writer.rs
@@ -1,7 +1,7 @@
use super::mock;
use super::mock::MockRepository;
-
use crate::storage::refs::sigrefs::write::{error, CommitWriter};
-
use crate::storage::refs::{Refs, IDENTITY_ROOT};
+
use crate::storage::refs::sigrefs::write::{CommitWriter, error};
+
use crate::storage::refs::{IDENTITY_ROOT, Refs};

fn mock_refs() -> Refs {
    Refs::from(
modified crates/radicle/src/storage/refs/sigrefs/write/test/head_reader.rs
@@ -2,8 +2,8 @@ use radicle_git_ref_format::Component;

use super::mock::{self, MockRepository};
use crate::storage::refs::sigrefs::read;
-
use crate::storage::refs::sigrefs::write::{error, Head, HeadReader};
-
use crate::storage::refs::{Refs, IDENTITY_ROOT, SIGREFS_BRANCH};
+
use crate::storage::refs::sigrefs::write::{Head, HeadReader, error};
+
use crate::storage::refs::{IDENTITY_ROOT, Refs, SIGREFS_BRANCH};

/// Drive `HeadReader` directly via the sigrefs reference for `mock::node_id()`.
fn read(repo: &MockRepository) -> Result<Option<Head>, error::Head> {
modified crates/radicle/src/storage/refs/sigrefs/write/test/mock.rs
@@ -4,16 +4,16 @@ use std::str::FromStr as _;

use radicle_core::{NodeId, RepoId};
use radicle_git_metadata::author::{Author, Time};
+
use radicle_git_metadata::commit::CommitData;
use radicle_git_metadata::commit::headers::Headers;
use radicle_git_metadata::commit::trailers::OwnedTrailer;
-
use radicle_git_metadata::commit::CommitData;
use radicle_oid::Oid;

use crate::git;
use crate::identity::doc;
-
use crate::storage::refs::sigrefs::git::{object, reference};
-
use crate::storage::refs::{Refs, REFS_BLOB_PATH, SIGNATURE_BLOB_PATH, SIGREFS_BRANCH};
use crate::storage::HasRepoId;
+
use crate::storage::refs::sigrefs::git::{object, reference};
+
use crate::storage::refs::{REFS_BLOB_PATH, Refs, SIGNATURE_BLOB_PATH, SIGREFS_BRANCH};

const MOCKED_IDENTITY: u8 = 99u8;

modified crates/radicle/src/storage/refs/sigrefs/write/test/signed_refs_writer.rs
@@ -1,8 +1,8 @@
use radicle_oid::Oid;

use crate::storage::refs::sigrefs::git::Committer;
-
use crate::storage::refs::sigrefs::write::{error, SignedRefsWriter, Update};
-
use crate::storage::refs::{FeatureLevel, Refs, IDENTITY_ROOT, SIGREFS_BRANCH};
+
use crate::storage::refs::sigrefs::write::{SignedRefsWriter, Update, error};
+
use crate::storage::refs::{FeatureLevel, IDENTITY_ROOT, Refs, SIGREFS_BRANCH};

use super::mock;
use super::mock::MockRepository;
modified crates/radicle/src/storage/refs/sigrefs/write/test/tree_writer.rs
@@ -1,7 +1,7 @@
use super::mock;
use super::mock::MockRepository;
-
use crate::storage::refs::sigrefs::write::{error, Tree, TreeWriter};
use crate::storage::refs::Refs;
+
use crate::storage::refs::sigrefs::write::{Tree, TreeWriter, error};

fn mock_refs() -> Refs {
    Refs::from([(mock::refs_heads_main(), mock::oid(10))].into_iter())
modified crates/radicle/src/test.rs
@@ -71,14 +71,14 @@ pub fn fetch<W: WriteRepository>(
pub mod setup {
    use std::path::{Path, PathBuf};

-
    use tempfile::{tempdir, TempDir};
+
    use tempfile::{TempDir, tempdir};

    use super::storage::{Namespaces, RefUpdate};
    use crate::crypto::test::signer::MockSigner;
    use crate::node::device::Device;
-
    use crate::storage::git::transport::remote;
    use crate::storage::git::Repository;
-
    use crate::{git, profile::Home, rad::REMOTE_NAME, test::fixtures, Storage};
+
    use crate::storage::git::transport::remote;
+
    use crate::{Storage, git, profile::Home, rad::REMOTE_NAME, test::fixtures};
    use crate::{prelude::*, rad};

    /// A node.
modified crates/radicle/src/test/arbitrary.rs
@@ -5,16 +5,16 @@ use std::str::FromStr;
use std::{iter, net};

use crypto::PublicKey;
-
use cyphernet::addr::tor::OnionAddrV3;
use cyphernet::EcPk;
+
use cyphernet::addr::tor::OnionAddrV3;
use qcheck::Arbitrary;

use crate::identity::doc::Visibility;
use crate::identity::project::ProjectName;
use crate::identity::{
+
    Did,
    doc::{Doc, DocAt, RawDoc, RepoId},
    project::Project,
-
    Did,
};
use crate::node::address::{AddressType, Source};
use crate::node::{Address, Alias, KnownAddress, Timestamp, UserAgent};
modified crates/radicle/src/test/assert.rs
@@ -125,7 +125,7 @@ macro_rules! _assert_matches_cfg {

#[cfg(test)]
mod test {
-
    use std::panic::{catch_unwind, UnwindSafe};
+
    use std::panic::{UnwindSafe, catch_unwind};

    #[derive(Debug)]
    enum Foo {
modified crates/radicle/src/test/fixtures.rs
@@ -3,13 +3,13 @@ use std::str::FromStr;

use crate::crypto::PublicKey;
use crate::git;
-
use crate::identity::doc::Visibility;
use crate::identity::RepoId;
-
use crate::node::device::Device;
+
use crate::identity::doc::Visibility;
use crate::node::Alias;
+
use crate::node::device::Device;
use crate::rad;
-
use crate::storage::git::transport;
use crate::storage::git::Storage;
+
use crate::storage::git::transport;
use crate::storage::refs::SignedRefs;

/// The birth of the radicle project, January 1st, 2018.
modified crates/radicle/src/test/storage.rs
@@ -10,8 +10,8 @@ pub use crate::git;
use crate::git::fmt;

use crate::identity::doc::{Doc, DocAt, DocError, RawDoc, RepoId};
-
use crate::node::device::Device;
use crate::node::NodeId;
+
use crate::node::device::Device;

pub use crate::storage::*;