cob: Fix some clippy warnings
This commit is contained in:
parent
f9c722c160
commit
87ae8cfb62
|
|
@ -3,7 +3,6 @@
|
||||||
use std::collections::BTreeMap;
|
use std::collections::BTreeMap;
|
||||||
use std::convert::TryFrom;
|
use std::convert::TryFrom;
|
||||||
|
|
||||||
use git_ext::author;
|
|
||||||
use git_ext::author::Author;
|
use git_ext::author::Author;
|
||||||
use git_ext::commit::{headers::Headers, Commit};
|
use git_ext::commit::{headers::Headers, Commit};
|
||||||
use git_ext::Oid;
|
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 (author, timestamp) = if let Ok(s) = std::env::var(crate::git::RAD_COMMIT_TIME) {
|
||||||
let timestamp = s.trim().parse::<i64>().unwrap();
|
let timestamp = s.trim().parse::<i64>().unwrap();
|
||||||
let author = Author {
|
let author = Author {
|
||||||
time: author::Time::new(timestamp, 0),
|
time: git_ext::author::Time::new(timestamp, 0),
|
||||||
..author
|
..author
|
||||||
};
|
};
|
||||||
(author, timestamp)
|
(author, timestamp)
|
||||||
|
|
|
||||||
|
|
@ -63,11 +63,11 @@ impl CollaborativeObject {
|
||||||
/// [`TypeName`] and [`ObjectId`] from it.
|
/// [`TypeName`] and [`ObjectId`] from it.
|
||||||
///
|
///
|
||||||
/// This assumes that the `refname` is in a
|
/// 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
|
/// `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:
|
/// reference name is of the form:
|
||||||
///
|
///
|
||||||
/// `refs/<category>/<typename>/<object_id>[/<rest>*]`
|
/// `refs/<category>/<typename>/<object_id>[/<rest>*]`
|
||||||
|
|
@ -77,7 +77,7 @@ impl CollaborativeObject {
|
||||||
///
|
///
|
||||||
/// Also note that this will return `None` if:
|
/// 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 [`ObjectId`] fails
|
||||||
/// * The parsing of the [`TypeName`] fails
|
/// * The parsing of the [`TypeName`] fails
|
||||||
pub fn parse_refstr<R>(name: &R) -> Option<(TypeName, ObjectId)>
|
pub fn parse_refstr<R>(name: &R) -> Option<(TypeName, ObjectId)>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue