Skip to content

Commit cf16365

Browse files
authored
misc fixes and nits from clippy (#104)
1 parent c0201c7 commit cf16365

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

src/diagnostic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ where
220220
F: FnOnce() -> S,
221221
S: Into<<Self::Error as Diagnostic>::Subject>,
222222
{
223-
self.diagnose(f())
223+
self.map_err(|error| error.into_report(f()))
224224
}
225225
}
226226

src/pointer.rs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,6 @@ impl Pointer {
368368
/// [`ResolveError`]: `crate::resolve::ResolveError`
369369
/// [`Token`]: `crate::Token`
370370
/// [`Index`]: `crate::index::Index`
371-
372371
#[cfg(feature = "resolve")]
373372
pub fn resolve_mut<'v, R: crate::ResolveMut>(
374373
&self,
@@ -679,7 +678,7 @@ impl PartialEq<&str> for Pointer {
679678
&&self.0 == other
680679
}
681680
}
682-
impl<'p> PartialEq<String> for &'p Pointer {
681+
impl PartialEq<String> for &Pointer {
683682
fn eq(&self, other: &String) -> bool {
684683
self.0.eq(other)
685684
}
@@ -869,7 +868,7 @@ impl PartialOrd<&str> for PointerBuf {
869868
}
870869
}
871870

872-
impl<'p> PartialOrd<PointerBuf> for &'p Pointer {
871+
impl PartialOrd<PointerBuf> for &Pointer {
873872
fn partial_cmp(&self, other: &PointerBuf) -> Option<Ordering> {
874873
self.0.partial_cmp(other.0.as_str())
875874
}
@@ -2343,11 +2342,4 @@ mod tests {
23432342
let unboxed = boxed.into_buf();
23442343
assert_eq!(subjectal, unboxed);
23452344
}
2346-
2347-
#[test]
2348-
#[cfg(feature = "miette")]
2349-
fn quick_miette_spike() {
2350-
let err = PointerBuf::parse("hello-world").unwrap_err();
2351-
println!("{:?}", miette::Report::from(err));
2352-
}
23532345
}

0 commit comments

Comments
 (0)