cob: Fix some clippy warnings

This commit is contained in:
Alexis Sellier 2023-05-12 12:47:41 +02:00
parent f9c722c160
commit 87ae8cfb62
No known key found for this signature in database
2 changed files with 5 additions and 6 deletions

View File

@ -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)

View File

@ -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)>