Browse Source

clippy 1.46.0!

master
Alison Watson 2 years ago
parent
commit
24d0f8e051
  1. 2
      source/framework/data/image.rs
  2. 2
      source/framework/log/level.rs
  3. 2
      source/framework/render/image.rs

2
source/framework/data/image.rs

@ -187,7 +187,7 @@ impl std::ops::Index<(usize, usize)> for Image {
}
impl<I> MaybeRev<I> {
fn rev_if(it: I, rev: bool) -> Self {
const fn rev_if(it: I, rev: bool) -> Self {
if rev {
Self::Rev(it)
} else {

2
source/framework/log/level.rs

@ -29,7 +29,7 @@ impl Default for Level {
}
impl Level {
pub fn name(self) -> &'static str {
pub const fn name(self) -> &'static str {
match self {
Self::Critical => "Critical",
Self::Error => "Error",

2
source/framework/render/image.rs

@ -322,7 +322,7 @@ impl Image {
Rc::new(Self::Indep(img))
}
pub fn info(&self) -> &ImageInfo {
pub const fn info(&self) -> &ImageInfo {
match self {
Self::Owned(image) => &image.info,
Self::Indep(image) => &image.info,

Loading…
Cancel
Save