Skip to content

Commit

Permalink
Fix compilation from rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
arqunis committed Jan 22, 2024
1 parent fc2f751 commit d9dbcae
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/model/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use std::hash::Hash;
use std::marker::PhantomData;

Check failure on line 4 in src/model/utils.rs

View workflow job for this annotation

GitHub Actions / Format

Diff in /home/runner/work/serenity/serenity/src/model/utils.rs

use arrayvec::ArrayVec;
use small_fixed_array::FixedString;
use serde::ser::{Serialize, SerializeSeq, Serializer};

use super::prelude::*;
Expand Down Expand Up @@ -84,11 +85,11 @@ impl StrOrInt<'_> {
}
}

pub fn into_enum<T>(self, string: fn(String) -> T, int: fn(u64) -> T) -> T {
pub fn into_enum<T>(self, string: fn(FixedString) -> T, int: fn(u64) -> T) -> T {
match self {
Self::Int(val) => int(val),
Self::String(val) => string(val),
Self::Str(val) => string(val.into()),
Self::String(val) => string(FixedString::from_string_trunc(val)),
Self::Str(val) => string(FixedString::from_str_trunc(val)),
}
}
}
Expand Down

0 comments on commit d9dbcae

Please sign in to comment.