File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
git-protocol/src/fetch/refs Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
- use bstr:: BString ;
1
+ use bstr:: { BStr , BString } ;
2
2
3
3
mod error {
4
4
use crate :: fetch:: refs:: parse;
@@ -81,17 +81,17 @@ impl Ref {
81
81
/// Provide shared fields referring to the ref itself, namely `(name, target, [peeled])`.
82
82
/// In case of peeled refs, the tag object itself is returned as it is what the ref directly refers to, and target of the tag is returned
83
83
/// as `peeled`.
84
- pub fn unpack ( & self ) -> ( & BString , & git_hash:: oid , Option < & git_hash:: oid > ) {
84
+ pub fn unpack ( & self ) -> ( & BStr , & git_hash:: oid , Option < & git_hash:: oid > ) {
85
85
match self {
86
86
Ref :: Direct { full_ref_name, object }
87
87
| Ref :: Symbolic {
88
88
full_ref_name, object, ..
89
- } => ( full_ref_name, object, None ) ,
89
+ } => ( full_ref_name. as_ref ( ) , object, None ) ,
90
90
Ref :: Peeled {
91
91
full_ref_name,
92
92
tag : object,
93
93
object : peeled,
94
- } => ( full_ref_name, object, Some ( peeled) ) ,
94
+ } => ( full_ref_name. as_ref ( ) , object, Some ( peeled) ) ,
95
95
}
96
96
}
97
97
}
You can’t perform that action at this time.
0 commit comments