mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-19 02:48:12 +08:00
Upgrade to the Rust 2024 edition (#2367)
* Update to rust 2024 edition * Fixes * Clean up imports * Cargo fmt again --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use crate::{Pixel, RawImage, CHANNELS_IN_RGB};
|
||||
use crate::{CHANNELS_IN_RGB, Pixel, RawImage};
|
||||
|
||||
impl RawImage {
|
||||
pub fn convert_to_rgb_fn(&self) -> impl Fn(Pixel) -> [u16; CHANNELS_IN_RGB] {
|
||||
pub fn convert_to_rgb_fn(&self) -> impl Fn(Pixel) -> [u16; CHANNELS_IN_RGB] + use<> {
|
||||
let Some(camera_to_rgb) = self.camera_to_rgb else { todo!() };
|
||||
|
||||
move |pixel: Pixel| {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use crate::{Histogram, Image, Pixel, CHANNELS_IN_RGB};
|
||||
use crate::{CHANNELS_IN_RGB, Histogram, Image, Pixel};
|
||||
use std::f64::consts::E;
|
||||
|
||||
impl Image<u16> {
|
||||
pub fn gamma_correction_fn(&self, histogram: &Histogram) -> impl Fn(Pixel) -> [u16; CHANNELS_IN_RGB] {
|
||||
pub fn gamma_correction_fn(&self, histogram: &Histogram) -> impl Fn(Pixel) -> [u16; CHANNELS_IN_RGB] + use<> {
|
||||
let percentage = self.width * self.height;
|
||||
|
||||
let mut white = 0;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use crate::{Histogram, Pixel, PixelTransform, RawImage, CHANNELS_IN_RGB};
|
||||
use crate::{CHANNELS_IN_RGB, Histogram, Pixel, PixelTransform, RawImage};
|
||||
|
||||
impl RawImage {
|
||||
pub fn record_histogram_fn(&self) -> RecordHistogram {
|
||||
|
||||
Reference in New Issue
Block a user