Skip to content

Commit 4dd67db

Browse files
committed
refactor (#450)
Don't use `static` unless it's really needed
1 parent f409e4a commit 4dd67db

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gitoxide-core/src/repository/remote.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -280,8 +280,8 @@ mod refs_impl {
280280
object,
281281
} => write!(&mut out, "{} {} symref-target:{}", object, path, target).map(|_| object.as_ref()),
282282
fetch::Ref::Unborn { full_ref_name, target } => {
283-
static NULL: git::hash::ObjectId = git::hash::ObjectId::null(git::hash::Kind::Sha1);
284-
write!(&mut out, "unborn {} symref-target:{}", full_ref_name, target).map(|_| NULL.as_ref())
283+
let null = git::hash::ObjectId::null(git::hash::Kind::Sha1);
284+
write!(&mut out, "unborn {} symref-target:{}", full_ref_name, target).map(|_| null.as_ref())
285285
}
286286
}
287287
}

0 commit comments

Comments
 (0)