chore: fix clippy warnings and run rustfmt
This commit is contained in:
1 parent
fecd8bf33f
commit
3765e6b05d
21 files changed
+420
-369
No files matched your search
+12
-10
@@ -13,7 +13,6 @@ pub enum ChangeKind {
|
||||
Renamed,
|
||||
}
|
||||
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
|
||||
pub struct CodeChange {
|
||||
pub timestamp: u64,
|
||||
@@ -55,16 +54,18 @@ impl CodeChange {
|
||||
return vcs.as_str();
|
||||
}
|
||||
if let Some(rev) = self.revision.as_deref().or(self.git_commit.as_deref())
|
||||
&& rev.starts_with('r') && rev[1..].chars().all(|c| c.is_ascii_digit()) {
|
||||
return "svn";
|
||||
}
|
||||
&& rev.starts_with('r')
|
||||
&& rev[1..].chars().all(|c| c.is_ascii_digit())
|
||||
{
|
||||
return "svn";
|
||||
}
|
||||
if let Some(br) = self.branch.as_deref().or(self.git_branch.as_deref())
|
||||
&& (br.eq_ignore_ascii_case("trunk")
|
||||
|| br.starts_with("branches/")
|
||||
|| br.starts_with("tags/"))
|
||||
{
|
||||
return "svn";
|
||||
}
|
||||
{
|
||||
return "svn";
|
||||
}
|
||||
"git"
|
||||
}
|
||||
|
||||
@@ -262,9 +263,10 @@ impl KnowledgeGraph {
|
||||
HashMap::with_capacity(self.relations.len() * 2);
|
||||
for rel in &self.relations {
|
||||
if let Some(rf) = relation_filter
|
||||
&& rel.relation_type != rf {
|
||||
continue;
|
||||
}
|
||||
&& rel.relation_type != rf
|
||||
{
|
||||
continue;
|
||||
}
|
||||
adj.entry(rel.from.as_str()).or_default().push((
|
||||
rel.to.as_str(),
|
||||
rel.relation_type.as_str(),
|
||||
|
||||
Reference in new issue
Block a user