diff --git a/.rustfmt.toml b/.rustfmt.toml deleted file mode 100644 index 0fc9b0b..0000000 --- a/.rustfmt.toml +++ /dev/null @@ -1,29 +0,0 @@ -max_width = 100 -# yeap -comment_width = 80 -wrap_comments = true -hard_tabs = false -tab_spaces = 4 -imports_layout = "HorizontalVertical" -imports_granularity = "Crate" - -newline_style = "Unix" -use_small_heuristics = "Default" - -reorder_imports = true -reorder_modules = true - -remove_nested_parens = true - -fn_args_layout = "Tall" - -edition = "2018" - -match_block_trailing_comma = true - -merge_derives = true - -use_try_shorthand = false -use_field_init_shorthand = false - -force_explicit_abi = true diff --git a/git-storage/src/backend/write.rs b/git-storage/src/backend/write.rs index 58f0910..bff77ee 100644 --- a/git-storage/src/backend/write.rs +++ b/git-storage/src/backend/write.rs @@ -16,12 +16,9 @@ use git_ext::{ use crate::{ odb, refdb::{ - self, - resolve, + self, resolve, write::{previous, Applied, Policy, SymrefTarget, Update, Updated}, - Read as _, - Reference, - Target, + Read as _, Reference, Target, }, signature::UserInfo, }; @@ -67,7 +64,7 @@ impl Write { .external_template(false), )?; Ok(backend) - }, + } Ok(repo) => Ok(repo), Err(e) => Err(e), }?; @@ -225,7 +222,7 @@ impl<'a> Transaction<'a> { } else { None } - }, + } None => None, }; @@ -289,7 +286,7 @@ impl<'a> Transaction<'a> { Some(src) => match src.target { Target::Direct { .. } if matches!(type_change, Policy::Abort) => { Err(error::Update::TypeChange(name.into())) - }, + } Target::Direct { .. } if matches!(type_change, Policy::Reject) => { Ok(Either::Left(Update::Symbolic { name, @@ -298,7 +295,7 @@ impl<'a> Transaction<'a> { previous, reflog, })) - }, + } _ => { let dst = self.refdb.find_reference(&target.name)?; match dst { @@ -309,14 +306,14 @@ impl<'a> Transaction<'a> { Ok(Either::Right( self.symbolic_edit(name, target, prev, &reflog, is_ff)?, )) - }, + } Target::Symbolic { .. } => Err(error::Update::TargetSymbolic(dst.name)), }, None => Ok(Either::Right( self.symbolic_edit(name, target, prev, &reflog, true)?, )), } - }, + } }, None => Ok(Either::Right( self.symbolic_edit(name, target, prev, &reflog, true)?, @@ -355,7 +352,7 @@ impl<'a> Transaction<'a> { match given { None => { panic!("BUG: the previous value for a reference to be removed was not given, but its existence SHOULD be guarded") - }, + } Some(previous) => Ok(Either::Right(self.remove_edit(name, previous)?)), } } diff --git a/git-storage/src/refdb.rs b/git-storage/src/refdb.rs index 86f45d3..7886f69 100644 --- a/git-storage/src/refdb.rs +++ b/git-storage/src/refdb.rs @@ -60,7 +60,7 @@ impl<'a> TryFrom> for Reference { .ok_or(ParseReference::InvalidUtf8) .and_then(|name| RefString::try_from(name).map_err(ParseReference::from))?; name.into() - }, + } Some(oid) => oid.into(), }; diff --git a/git-storage/src/refdb/iter.rs b/git-storage/src/refdb/iter.rs index 189a7cb..56d990e 100644 --- a/git-storage/src/refdb/iter.rs +++ b/git-storage/src/refdb/iter.rs @@ -37,7 +37,7 @@ impl<'a, G: glob::Pattern + Debug> Iterator for ReferencesGlob<'a, G> { Ok(reference) => match reference.name() { Some(name) if self.glob.matches(name) => { return Some(Reference::try_from(reference).map_err(error::Iter::from)) - }, + } _ => continue, }, diff --git a/git-storage/src/refdb/write/previous.rs b/git-storage/src/refdb/write/previous.rs index efe0be1..1ec1b8e 100644 --- a/git-storage/src/refdb/write/previous.rs +++ b/git-storage/src/refdb/write/previous.rs @@ -55,14 +55,14 @@ impl Edit { } else { Ok(()) } - }, + } Self::MustNotExist => { if given.is_some() { Err(DoesExist) } else { Ok(()) } - }, + } Self::MustExistAndMatch(expected) => match given { Some(given) if &given == expected => Ok(()), Some(given) => Err(DoesNotMatch { @@ -118,7 +118,7 @@ impl Remove { } else { Ok(()) } - }, + } Self::MustExistAndMatch(expected) => match given { Some(given) if &given == expected => Ok(()), Some(given) => Err(DoesNotMatch { diff --git a/radicle-git-ext/git-ref-format/core/src/cbor.rs b/radicle-git-ext/git-ref-format/core/src/cbor.rs index 8856094..e01e46a 100644 --- a/radicle-git-ext/git-ref-format/core/src/cbor.rs +++ b/radicle-git-ext/git-ref-format/core/src/cbor.rs @@ -8,18 +8,12 @@ use std::convert::TryFrom; use minicbor::{ decode, encode::{self, Write}, - Decode, - Decoder, - Encode, - Encoder, + Decode, Decoder, Encode, Encoder, }; use crate::{ refspec::{PatternStr, PatternString}, - Namespaced, - Qualified, - RefStr, - RefString, + Namespaced, Qualified, RefStr, RefString, }; impl<'de: 'a, 'a> Decode<'de> for &'a RefStr { diff --git a/radicle-git-ext/git-ref-format/core/src/check.rs b/radicle-git-ext/git-ref-format/core/src/check.rs index 9509cb4..4c60fce 100644 --- a/radicle-git-ext/git-ref-format/core/src/check.rs +++ b/radicle-git-ext/git-ref-format/core/src/check.rs @@ -101,6 +101,6 @@ pub fn ref_format(opts: Options, s: &str) -> Result<(), Error> { } else { Ok(()) } - }, + } } } diff --git a/radicle-git-ext/git-ref-format/core/src/deriv.rs b/radicle-git-ext/git-ref-format/core/src/deriv.rs index 2b8d597..e67eb78 100644 --- a/radicle-git-ext/git-ref-format/core/src/deriv.rs +++ b/radicle-git-ext/git-ref-format/core/src/deriv.rs @@ -10,12 +10,9 @@ use std::{ }; use crate::{ - lit, - name, + lit, name, refspec::{PatternStr, QualifiedPattern}, - Component, - RefStr, - RefString, + Component, RefStr, RefString, }; /// A fully-qualified refname. diff --git a/radicle-git-ext/git-ref-format/core/src/name.rs b/radicle-git-ext/git-ref-format/core/src/name.rs index 17b29d6..933d558 100644 --- a/radicle-git-ext/git-ref-format/core/src/name.rs +++ b/radicle-git-ext/git-ref-format/core/src/name.rs @@ -14,8 +14,7 @@ use std::{ use crate::{ check, refspec::{PatternStr, PatternString}, - Namespaced, - Qualified, + Namespaced, Qualified, }; mod iter; @@ -285,7 +284,7 @@ impl RefString { Some(idx) => { self.0.truncate(idx); true - }, + } } } diff --git a/radicle-git-ext/git-ref-format/core/src/refspec.rs b/radicle-git-ext/git-ref-format/core/src/refspec.rs index 0e1967e..c2b1591 100644 --- a/radicle-git-ext/git-ref-format/core/src/refspec.rs +++ b/radicle-git-ext/git-ref-format/core/src/refspec.rs @@ -182,7 +182,7 @@ impl PatternString { Some(idx) => { self.0.truncate(idx); true - }, + } } } } diff --git a/radicle-git-ext/git-ref-format/core/src/serde.rs b/radicle-git-ext/git-ref-format/core/src/serde.rs index f492695..0d621d0 100644 --- a/radicle-git-ext/git-ref-format/core/src/serde.rs +++ b/radicle-git-ext/git-ref-format/core/src/serde.rs @@ -9,10 +9,7 @@ use ::serde::{de, Deserialize, Deserializer, Serialize, Serializer}; use crate::{ refspec::{PatternStr, PatternString}, - Namespaced, - Qualified, - RefStr, - RefString, + Namespaced, Qualified, RefStr, RefString, }; impl<'de: 'a, 'a> Deserialize<'de> for &'a RefStr { diff --git a/radicle-git-ext/git-ref-format/macro/src/lib.rs b/radicle-git-ext/git-ref-format/macro/src/lib.rs index 393bcd2..e3ceaa3 100644 --- a/radicle-git-ext/git-ref-format/macro/src/lib.rs +++ b/radicle-git-ext/git-ref-format/macro/src/lib.rs @@ -38,11 +38,11 @@ pub fn refname(input: TokenStream) -> TokenStream { } }; TokenStream::from(expand) - }, + } Err(e) => { abort!(lit.span(), "invalid refname literal: {}", e); - }, + } } } @@ -75,20 +75,20 @@ pub fn qualified(input: TokenStream) -> TokenStream { }; TokenStream::from(expand) - }, + } None => { abort!( lit.span(), "refname is not of the form 'refs//'" ); - }, + } } - }, + } Err(e) => { abort!(lit.span(), "invalid refname literal: {}", e); - }, + } } } @@ -121,17 +121,17 @@ pub fn component(input: TokenStream) -> TokenStream { }; TokenStream::from(expand) - }, + } None => { abort!(lit.span(), "component contains a '/'"); - }, + } } - }, + } Err(e) => { abort!(lit.span(), "invalid refname literal: {}", e); - }, + } } } @@ -159,10 +159,10 @@ pub fn pattern(input: TokenStream) -> TokenStream { } }; TokenStream::from(expand) - }, + } Err(e) => { abort!(lit.span(), "invalid refspec pattern literal: {}", e); - }, + } } } diff --git a/radicle-git-ext/git-ref-format/src/lib.rs b/radicle-git-ext/git-ref-format/src/lib.rs index a0dad0f..4ff0510 100644 --- a/radicle-git-ext/git-ref-format/src/lib.rs +++ b/radicle-git-ext/git-ref-format/src/lib.rs @@ -124,17 +124,8 @@ #[cfg(feature = "percent-encoding")] pub use git_ref_format_core::PercentEncode; pub use git_ref_format_core::{ - check_ref_format, - lit, - name::component, - Component, - DuplicateGlob, - Error, - Namespaced, - Options, - Qualified, - RefStr, - RefString, + check_ref_format, lit, name::component, Component, DuplicateGlob, Error, Namespaced, Options, + Qualified, RefStr, RefString, }; pub mod name { diff --git a/radicle-git-ext/src/author.rs b/radicle-git-ext/src/author.rs index eb34a64..7a38310 100644 --- a/radicle-git-ext/src/author.rs +++ b/radicle-git-ext/src/author.rs @@ -122,7 +122,7 @@ impl FromStr for Author { let hours = tz_offset / 100; let minutes = tz_offset % 100; hours * 60 + minutes - }, + } }; let time = match components.next_back() { None => return Err(ParseError::Missing("time")), diff --git a/radicle-git-ext/src/blob.rs b/radicle-git-ext/src/blob.rs index c6c5c43..358d9b4 100644 --- a/radicle-git-ext/src/blob.rs +++ b/radicle-git-ext/src/blob.rs @@ -83,13 +83,13 @@ impl<'a> Blob<'a> { git.find_reference(&name).or_matches(is_not_found_err, || { Err(Error::NotFound(NotFound::NoSuchBranch(name.into_owned()))) }) - }, + } Branch::Ref(reference) => Ok(reference), }?; let tree = reference.peel_to_tree()?; blob(git, tree, path) - }, + } Self::Init { branch, path } => { let start = match branch { @@ -100,7 +100,7 @@ impl<'a> Blob<'a> { (_, Some(sym)) => Ok(revwalk::Start::Ref(sym.to_string())), (_, _) => Err(Error::NotFound(NotFound::NoRefTarget)), } - }, + } }?; let revwalk = revwalk::FirstParent::new(git, start)?.reverse()?; @@ -112,9 +112,9 @@ impl<'a> Blob<'a> { let oid = oid?; let tree = git.find_commit(oid)?.tree()?; blob(git, tree, path) - }, + } } - }, + } Self::At { object, path } => { let tree = git @@ -124,7 +124,7 @@ impl<'a> Blob<'a> { }) .and_then(|obj| Ok(obj.peel_to_tree()?))?; blob(git, tree, path) - }, + } } } } diff --git a/radicle-git-ext/src/tree.rs b/radicle-git-ext/src/tree.rs index 86106b5..932490c 100644 --- a/radicle-git-ext/src/tree.rs +++ b/radicle-git-ext/src/tree.rs @@ -70,11 +70,11 @@ impl Tree<'_> { Blob(data) => { let oid = repo.blob(data)?; builder.insert(name.as_ref(), oid, git2::FileMode::Blob.into())?; - }, + } Tree(sub) => { let oid = sub.write(repo)?; builder.insert(name.as_ref(), oid, git2::FileMode::Tree.into())?; - }, + } } } diff --git a/radicle-git-ext/t/src/git_ref_format/tests.rs b/radicle-git-ext/t/src/git_ref_format/tests.rs index 69be5c8..8a43669 100644 --- a/radicle-git-ext/t/src/git_ref_format/tests.rs +++ b/radicle-git-ext/t/src/git_ref_format/tests.rs @@ -2,15 +2,7 @@ // SPDX-License-Identifier: GPL-3.0-or-later use radicle_git_ext::ref_format::{ - component, - name, - qualified, - refname, - refspec, - Error, - Qualified, - RefStr, - RefString, + component, name, qualified, refname, refspec, Error, Qualified, RefStr, RefString, }; #[test] diff --git a/radicle-surf/build.rs b/radicle-surf/build.rs index 6cefd73..f6fbf21 100644 --- a/radicle-surf/build.rs +++ b/radicle-surf/build.rs @@ -16,8 +16,7 @@ // along with this program. If not, see . use std::{ - env, - fs, + env, fs, fs::File, io, path::{Path, PathBuf}, diff --git a/radicle-surf/examples/browsing.rs b/radicle-surf/examples/browsing.rs index c0abd39..5b2f3d8 100644 --- a/radicle-surf/examples/browsing.rs +++ b/radicle-surf/examples/browsing.rs @@ -36,7 +36,7 @@ fn main() { None => { print_usage(); return; - }, + } }; let repo = Repository::discover(repo_path).unwrap(); let now = Instant::now(); diff --git a/radicle-surf/examples/diff.rs b/radicle-surf/examples/diff.rs index cad72aa..31b5b76 100644 --- a/radicle-surf/examples/diff.rs +++ b/radicle-surf/examples/diff.rs @@ -42,7 +42,7 @@ fn get_options_or_exit() -> Options { Err(message) => { println!("{message}"); std::process::exit(1); - }, + } } } @@ -52,7 +52,7 @@ fn init_repository_or_exit(path_to_repo: &str) -> Repository { Err(e) => { println!("Failed to create repository: {e:?}"); std::process::exit(1); - }, + } } } diff --git a/radicle-surf/src/blob.rs b/radicle-surf/src/blob.rs index 2326e74..9d7ed3d 100644 --- a/radicle-surf/src/blob.rs +++ b/radicle-surf/src/blob.rs @@ -138,7 +138,7 @@ where Err(_) => { let encoded = base64::encode(bytes); state.serialize_field("content", &encoded)? - }, + } }; state.serialize_field("lastCommit", &self.commit)?; state.end() @@ -162,7 +162,7 @@ impl<'a> Serialize for BlobRef<'a> { Err(_) => { let encoded = base64::encode(bytes); state.serialize_field("content", &encoded)? - }, + } }; state.end() } diff --git a/radicle-surf/src/branch.rs b/radicle-surf/src/branch.rs index b419b09..a4685db 100644 --- a/radicle-surf/src/branch.rs +++ b/radicle-surf/src/branch.rs @@ -134,7 +134,7 @@ impl Local { name: name.as_ref().to_ref_string(), } } - }, + } } } diff --git a/radicle-surf/src/diff.rs b/radicle-surf/src/diff.rs index 21c6e91..e0a2bbb 100644 --- a/radicle-surf/src/diff.rs +++ b/radicle-surf/src/diff.rs @@ -381,23 +381,23 @@ impl Serialize for FileDiff { FileDiff::Added(x) => { state.serialize_field("path", &x.path)?; state.serialize_field("diff", &x.diff)?; - }, + } FileDiff::Deleted(x) => { state.serialize_field("path", &x.path)?; state.serialize_field("diff", &x.diff)?; - }, + } FileDiff::Modified(x) => { state.serialize_field("path", &x.path)?; state.serialize_field("diff", &x.diff)?; - }, + } FileDiff::Moved(x) => { state.serialize_field("oldPath", &x.old_path)?; state.serialize_field("newPath", &x.new_path)?; - }, + } FileDiff::Copied(x) => { state.serialize_field("oldPath", &x.old_path)?; state.serialize_field("newPath", &x.new_path)?; - }, + } } state.end() } @@ -555,14 +555,14 @@ impl Serialize for Modification { map.serialize_entry("lineNo", &addition.line_no)?; map.serialize_entry("type", "addition")?; map.end() - }, + } Modification::Deletion(deletion) => { let mut map = serializer.serialize_map(Some(3))?; map.serialize_entry("line", &deletion.line)?; map.serialize_entry("lineNo", &deletion.line_no)?; map.serialize_entry("type", "deletion")?; map.end() - }, + } Modification::Context { line, line_no_old, @@ -574,7 +574,7 @@ impl Serialize for Modification { map.serialize_entry("lineNoNew", line_no_new)?; map.serialize_entry("type", "context")?; map.end() - }, + } } } } diff --git a/radicle-surf/src/diff/git.rs b/radicle-surf/src/diff/git.rs index e2bda0a..ce406be 100644 --- a/radicle-surf/src/diff/git.rs +++ b/radicle-surf/src/diff/git.rs @@ -18,16 +18,7 @@ use std::convert::TryFrom; use super::{ - Diff, - DiffContent, - DiffFile, - EofNewLine, - FileMode, - FileStats, - Hunk, - Hunks, - Line, - Modification, + Diff, DiffContent, DiffFile, EofNewLine, FileMode, FileStats, Hunk, Hunks, Line, Modification, Stats, }; @@ -168,24 +159,24 @@ impl TryFrom> for DiffContent { new_missing_eof = true; old_missing_eof = true; continue; - }, + } git2::DiffLineType::Addition => { additions += 1; - }, + } git2::DiffLineType::Deletion => { deletions += 1; - }, + } git2::DiffLineType::AddEOFNL => { additions += 1; old_missing_eof = true; continue; - }, + } git2::DiffLineType::DeleteEOFNL => { deletions += 1; new_missing_eof = true; continue; - }, - _ => {}, + } + _ => {} } let line = Modification::try_from(line)?; lines.push(line); @@ -254,7 +245,7 @@ impl<'a> TryFrom> for Diff { Delta::Copied => copied(&mut diff, &git_diff, idx, &delta)?, status => { return Err(error::Diff::DeltaUnhandled(status)); - }, + } } } diff --git a/radicle-surf/src/fs.rs b/radicle-surf/src/fs.rs index 47e52c0..275be71 100644 --- a/radicle-surf/src/fs.rs +++ b/radicle-surf/src/fs.rs @@ -297,7 +297,7 @@ impl Entry { .then(|| repo.find_submodule(&name)) .transpose()?; Ok(Self::Submodule(Submodule::new(name, path, submodule, id)?)) - }, + } _ => Err(error::Directory::InvalidType(path, "tree or blob")), } } @@ -396,21 +396,21 @@ impl Directory { Entry::File(_) => { entries.insert(entry.name().clone(), entry); git2::TreeWalkResult::Ok - }, + } Entry::Directory(_) => { entries.insert(entry.name().clone(), entry); // Skip nested directories git2::TreeWalkResult::Skip - }, + } Entry::Submodule(_) => { entries.insert(entry.name().clone(), entry); git2::TreeWalkResult::Ok - }, + } }, Err(err) => { error = Some(err); git2::TreeWalkResult::Abort - }, + } } })?; @@ -520,7 +520,7 @@ impl Directory { Entry::Directory(directory) => { let acc = directory.traverse(repo, acc, f)?; f(acc, entry) - }, + } Entry::Submodule(_) => f(acc, entry), }) } diff --git a/radicle-surf/src/glob.rs b/radicle-surf/src/glob.rs index 69bbbb7..f3a1302 100644 --- a/radicle-surf/src/glob.rs +++ b/radicle-surf/src/glob.rs @@ -18,12 +18,9 @@ use std::marker::PhantomData; use git_ext::ref_format::{ - self, - refname, + self, refname, refspec::{self, PatternString, QualifiedPattern}, - Qualified, - RefStr, - RefString, + Qualified, RefStr, RefString, }; use thiserror::Error; diff --git a/radicle-surf/src/namespace.rs b/radicle-surf/src/namespace.rs index fe75b52..0fd82f5 100644 --- a/radicle-surf/src/namespace.rs +++ b/radicle-surf/src/namespace.rs @@ -24,11 +24,7 @@ use std::{ use git_ext::ref_format::{ self, refspec::{NamespacedPattern, PatternString, QualifiedPattern}, - Component, - Namespaced, - Qualified, - RefStr, - RefString, + Component, Namespaced, Qualified, RefStr, RefString, }; use nonempty::NonEmpty; use thiserror::Error; diff --git a/radicle-surf/src/refs.rs b/radicle-surf/src/refs.rs index 2a11b6d..51b09c0 100644 --- a/radicle-surf/src/refs.rs +++ b/radicle-surf/src/refs.rs @@ -44,7 +44,7 @@ impl<'a> Iterator for Tags<'a> { res.map_err(error::Tag::from) .and_then(|r| Tag::try_from(&r).map_err(error::Tag::from)), ); - }, + } None => self.current += 1, }, None => break, @@ -67,7 +67,7 @@ impl<'a> Iterator for TagNames<'a> { .map(|name| lit::refs_tags(name).into()) .map_err(error::Tag::from) })) - }, + } None => self.inner.current += 1, }, None => break, @@ -111,7 +111,7 @@ impl<'a> Iterator for Branches<'a> { res.map_err(error::Branch::from) .and_then(|r| Branch::try_from(&r).map_err(error::Branch::from)), ) - }, + } None => self.current += 1, }, None => break, @@ -134,7 +134,7 @@ impl<'a> Iterator for BranchNames<'a> { .map(|branch| branch.refname().into_owned()) .map_err(error::Branch::from) })) - }, + } None => self.inner.current += 1, }, None => break, @@ -194,7 +194,7 @@ impl<'a> Iterator for Categories<'a> { let (_refs, category, c, cs) = name.non_empty_components(); Ok((category.to_ref_string(), refstr_join(c, cs))) })); - }, + } None => self.current += 1, }, None => break, diff --git a/radicle-surf/src/repo.rs b/radicle-surf/src/repo.rs index 94624e4..1d92efa 100644 --- a/radicle-surf/src/repo.rs +++ b/radicle-surf/src/repo.rs @@ -33,17 +33,7 @@ use crate::{ fs::{Directory, File, FileContent}, refs::{BranchNames, Branches, Categories, Namespaces, TagNames, Tags}, tree::{Entry, Tree}, - Branch, - Commit, - Error, - Glob, - History, - Namespace, - Revision, - Signature, - Stats, - Tag, - ToCommit, + Branch, Commit, Error, Glob, History, Namespace, Revision, Signature, Stats, Tag, ToCommit, }; /// Enumeration of errors that can occur in repo operations. @@ -405,7 +395,7 @@ impl Repository { } else { Err(error.into()) } - }, + } Ok(sig) => Ok(Some(Signature::from(sig.0))), } } diff --git a/radicle-surf/src/tag.rs b/radicle-surf/src/tag.rs index fe2a6cb..935d31b 100644 --- a/radicle-surf/src/tag.rs +++ b/radicle-surf/src/tag.rs @@ -136,7 +136,7 @@ impl TryFrom<&git2::Reference<'_>> for Tag { id: commit.id().into(), name, }) - }, + } Err(err) => Err(err.into()), } } diff --git a/radicle-surf/t/src/code_browsing.rs b/radicle-surf/t/src/code_browsing.rs index 054368f..6b0ecf8 100644 --- a/radicle-surf/t/src/code_browsing.rs +++ b/radicle-surf/t/src/code_browsing.rs @@ -3,8 +3,7 @@ use std::path::Path; use radicle_git_ext::ref_format::refname; use radicle_surf::{ fs::{self, Directory}, - Branch, - Repository, + Branch, Repository, }; use super::GIT_PLATINUM; diff --git a/radicle-surf/t/src/diff.rs b/radicle-surf/t/src/diff.rs index 2de12a6..725d50c 100644 --- a/radicle-surf/t/src/diff.rs +++ b/radicle-surf/t/src/diff.rs @@ -2,23 +2,10 @@ use pretty_assertions::assert_eq; use radicle_git_ext::{ref_format::refname, Oid}; use radicle_surf::{ diff::{ - Added, - Diff, - DiffContent, - DiffFile, - EofNewLine, - FileDiff, - FileMode, - FileStats, - Hunk, - Line, - Modification, - Modified, - Stats, + Added, Diff, DiffContent, DiffFile, EofNewLine, FileDiff, FileMode, FileStats, Hunk, Line, + Modification, Modified, Stats, }, - Branch, - Error, - Repository, + Branch, Error, Repository, }; use std::{path::Path, str::FromStr}; diff --git a/radicle-surf/t/src/file_system.rs b/radicle-surf/t/src/file_system.rs index 99d0424..9e572dc 100644 --- a/radicle-surf/t/src/file_system.rs +++ b/radicle-surf/t/src/file_system.rs @@ -7,8 +7,7 @@ mod directory { use radicle_git_ext::ref_format::refname; use radicle_surf::{ fs::{self, Entry}, - Branch, - Repository, + Branch, Repository, }; use std::path::Path;