mirror of
https://seed.radicle.dev/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5.git
synced 2026-11-21 10:30:41 +08:00
cob: Fix some clippy warnings
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
use std::collections::BTreeMap;
|
||||
use std::convert::TryFrom;
|
||||
|
||||
use git_ext::author;
|
||||
use git_ext::author::Author;
|
||||
use git_ext::commit::{headers::Headers, Commit};
|
||||
use git_ext::Oid;
|
||||
@@ -286,7 +285,7 @@ where
|
||||
let (author, timestamp) = if let Ok(s) = std::env::var(crate::git::RAD_COMMIT_TIME) {
|
||||
let timestamp = s.trim().parse::<i64>().unwrap();
|
||||
let author = Author {
|
||||
time: author::Time::new(timestamp, 0),
|
||||
time: git_ext::author::Time::new(timestamp, 0),
|
||||
..author
|
||||
};
|
||||
(author, timestamp)
|
||||
|
||||
@@ -63,11 +63,11 @@ impl CollaborativeObject {
|
||||
/// [`TypeName`] and [`ObjectId`] from it.
|
||||
///
|
||||
/// This assumes that the `refname` is in a
|
||||
/// [`git_ref_format::Qualified`] format. If it has any
|
||||
/// [`git_ext::ref_format::Qualified`] format. If it has any
|
||||
/// `refs/namespaces`, they will be stripped to access the underlying
|
||||
/// [`git_ref_format::Qualified`] format.
|
||||
/// [`git_ext::ref_format::Qualified`] format.
|
||||
///
|
||||
/// In the [`git_ref_format::Qualified`] format it assumes that the
|
||||
/// In the [`git_ext::ref_format::Qualified`] format it assumes that the
|
||||
/// reference name is of the form:
|
||||
///
|
||||
/// `refs/<category>/<typename>/<object_id>[/<rest>*]`
|
||||
@@ -77,7 +77,7 @@ impl CollaborativeObject {
|
||||
///
|
||||
/// Also note that this will return `None` if:
|
||||
///
|
||||
/// * The `refname` is not [`git_ref_format::Qualified`]
|
||||
/// * The `refname` is not [`git_ext::ref_format::Qualified`]
|
||||
/// * The parsing of the [`ObjectId`] fails
|
||||
/// * The parsing of the [`TypeName`] fails
|
||||
pub fn parse_refstr<R>(name: &R) -> Option<(TypeName, ObjectId)>
|
||||
|
||||
Reference in New Issue
Block a user