Skip to content

Commit

Permalink
Apply momo to fn gix::revision::Spec::from_bstr
Browse files Browse the repository at this point in the history
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
  • Loading branch information
NobodyXu committed Aug 29, 2023
1 parent 25912fe commit 1d90301
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gix/src/revision/spec/parse/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use std::collections::HashSet;

use gix_hash::ObjectId;
use gix_macros::momo;
use gix_revision::spec::parse;

use crate::{bstr::BStr, revision::Spec, Repository};
Expand Down Expand Up @@ -30,6 +31,7 @@ impl<'repo> Spec<'repo> {
/// Parse `spec` and use information from `repo` to resolve it, using `opts` to learn how to deal with ambiguity.
///
/// Note that it's easier and to use [`repo.rev_parse()`][Repository::rev_parse()] instead.
#[momo]
pub fn from_bstr<'a>(spec: impl Into<&'a BStr>, repo: &'repo Repository, opts: Options) -> Result<Self, Error> {
let mut delegate = Delegate::new(repo, opts);
match gix_revision::spec::parse(spec.into(), &mut delegate) {
Expand Down

0 comments on commit 1d90301

Please sign in to comment.