Skip to content

Commit 6649871

Browse files
committed
Changed edition to 2024
1 parent 717c5a2 commit 6649871

4 files changed

Lines changed: 4 additions & 10 deletions

File tree

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "ordpath"
33
version = "0.5.0"
44
authors = ["Yoh Deadfall <yoh.deadfall@hotmail.com>"]
5-
edition = "2021"
5+
edition = "2024"
66
homepage = "https://github.com/yohdeadfall/ordpath/"
77
repository = "https://github.com/yohdeadfall/ordpath/"
88
description = "Implementation of the ORDPATH hierarchical labeling scheme"

benches/ordpath.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use criterion::{black_box, criterion_group, criterion_main, Criterion};
1+
use criterion::{Criterion, black_box, criterion_group, criterion_main};
22
use ordpath::{DefaultEncoding, OrdPathBuf};
33

44
fn comparison(c: &mut Criterion) {

src/enc.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,9 +291,7 @@ impl<S: AsRef<[Stage]>> UserDefinedEncoding<S> {
291291
impl<S: AsRef<[Stage]>> Encoding for UserDefinedEncoding<S> {
292292
fn stage_by_prefix(&self, prefix: u8) -> Option<&Stage> {
293293
let index = self.stages_lookup[prefix as usize] as usize;
294-
let stage = self.stages.as_ref().get(index);
295-
296-
stage
294+
self.stages.as_ref().get(index)
297295
}
298296

299297
fn stage_by_value(&self, value: i64) -> Option<&Stage> {

src/lib.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,7 @@ pub(crate) struct Buf<const N: usize> {
6565
impl<const N: usize> Buf<N> {
6666
const INLINE_SIZE_LEN: usize = {
6767
const fn max(lhs: usize, rhs: usize) -> usize {
68-
if lhs > rhs {
69-
lhs
70-
} else {
71-
rhs
72-
}
68+
if lhs > rhs { lhs } else { rhs }
7369
}
7470

7571
const fn meta_size(data_len: usize) -> usize {

0 commit comments

Comments
 (0)