Skip to content

Commit b5f779d

Browse files
committed
Fix clippy
1 parent 923b1b2 commit b5f779d

3 files changed

Lines changed: 4 additions & 5 deletions

File tree

crates/engine_bibtex/src/auxi.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use crate::{
1515
peekable::{peekable_open, PeekableInput},
1616
pool::StringPool,
1717
scan::Scan,
18-
AuxNumber, Bibtex, BibtexError, GlobalItems, StrIlk, StrNumber,
18+
Bibtex, BibtexError, GlobalItems, StrIlk, StrNumber,
1919
};
2020
use std::{cell::RefCell, ffi::CString, ptr::NonNull};
2121
use tectonic_bridge_core::FileFormat;
@@ -43,8 +43,7 @@ impl AuxData {
4343

4444
pub fn pop_file(&mut self) -> (AuxFile, bool) {
4545
let out = self.aux.pop().unwrap();
46-
let last = self.aux.len() == 0;
47-
(out, last)
46+
(out, self.aux.is_empty())
4847
}
4948

5049
pub fn top_file(&self) -> &AuxFile {
@@ -55,7 +54,7 @@ impl AuxData {
5554
self.aux.last_mut().unwrap()
5655
}
5756

58-
pub fn ptr(&self) -> AuxNumber {
57+
pub fn ptr(&self) -> usize {
5958
self.aux.len()
6059
}
6160
}

crates/engine_bibtex/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,6 @@ type ASCIICode = u8;
336336
type BufPointer = usize;
337337
type PoolPointer = usize;
338338
type HashPointer = usize;
339-
type AuxNumber = usize;
340339
type BibNumber = usize;
341340
type WizFnLoc = usize;
342341
type FieldLoc = usize;

crates/engine_bibtex/src/peekable.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ impl PeekableInput {
3838
}
3939

4040
pub(crate) fn close(self, ctx: &mut Bibtex<'_, '_>) -> Result<(), BibtexError> {
41+
// SAFETY: Contained handle guaranteed valid at this point
4142
let err = unsafe { ttbc_input_close(ctx.engine, self.handle.as_ptr()) };
4243
if err == 0 {
4344
Ok(())

0 commit comments

Comments
 (0)