Skip to content

Commit 2a13247

Browse files
committed
fix!: remove unused and unusable PartialNameCow
1 parent 015e486 commit 2a13247

File tree

3 files changed

+3
-9
lines changed

3 files changed

+3
-9
lines changed

gix-ref/fuzz/fuzz_targets/fuzz_log.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ fn fuzz(ctx: Ctx) -> Result<()> {
2020

2121
let mut buf = [0u8; 1024];
2222
let read = std::io::Cursor::new(ctx.multi_line_reverse);
23-
let mut iter = gix_ref::file::log::iter::reverse(read, &mut buf)?;
23+
let iter = gix_ref::file::log::iter::reverse(read, &mut buf)?;
2424
_ = black_box(iter.map(|x| black_box(x)).count());
2525

26-
let mut iter = gix_ref::file::log::iter::forward(ctx.multi_line_forward);
26+
let iter = gix_ref::file::log::iter::forward(ctx.multi_line_forward);
2727
_ = black_box(iter.map(|x| black_box(x)).count());
2828

2929
Ok(())

gix-ref/fuzz/fuzz_targets/fuzz_names.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
use anyhow::Result;
44
use arbitrary::Arbitrary;
55
use bstr::{BStr, BString};
6-
use gix_ref::{namespace::expand, FullName, FullNameRef, PartialName, PartialNameCow, PartialNameRef};
6+
use gix_ref::{namespace::expand, FullName, FullNameRef, PartialName};
77
use libfuzzer_sys::fuzz_target;
88
use std::hint::black_box;
99

gix-ref/src/lib.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
#![cfg_attr(all(doc, feature = "document-features"), feature(doc_cfg, doc_auto_cfg))]
2424
#![deny(missing_docs, rust_2018_idioms, unsafe_code)]
2525

26-
use std::borrow::Cow;
27-
2826
use gix_hash::{oid, ObjectId};
2927
pub use gix_object::bstr;
3028
use gix_object::bstr::{BStr, BString};
@@ -133,10 +131,6 @@ pub struct FullName(pub(crate) BString);
133131
#[repr(transparent)]
134132
pub struct FullNameRef(BStr);
135133

136-
/// A validated and potentially partial reference name, safe to use for common operations.
137-
#[derive(PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone)]
138-
pub struct PartialNameCow<'a>(Cow<'a, BStr>);
139-
140134
/// A validated and potentially partial reference name, safe to use for common operations.
141135
#[derive(PartialEq, Eq, Debug, Hash, Ord, PartialOrd)]
142136
#[repr(transparent)]

0 commit comments

Comments
 (0)