Skip to content

Commit f2ded19

Browse files
Fix up naming
1 parent a6a02bf commit f2ded19

File tree

8 files changed

+17
-13
lines changed

8 files changed

+17
-13
lines changed

src/bin/decode_png.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use anyhow::{anyhow, Result};
2-
use norm::png::PngDecoder;
2+
use normeditor::png::PngDecoder;
33
#[cfg(feature = "time")]
4-
use norm::util::event_log::{log_event, Event};
4+
use normeditor::util::event_log::{log_event, Event};
55
#[cfg(feature = "time")]
66
use std::time::Instant;
77

src/bin/lato_glyphs.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use anyhow::Result;
2-
use norm::font::{
2+
use normeditor::font::{
33
grammar::{Glyph, GlyphData, SimpleGlyph},
44
shaper::TrueTypeFontShaper,
55
TrueTypeFontParser,
@@ -170,7 +170,7 @@ fn main() -> Result<()> {
170170
#[cfg(test)]
171171
mod tests {
172172
use super::*;
173-
use norm::font::grammar::SimpleGlyphFlag;
173+
use normeditor::font::grammar::SimpleGlyphFlag;
174174

175175
#[test]
176176
fn draw_implicit_points() {

src/bin/ssim.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use anyhow::{anyhow, Result};
2-
use norm::png::{grammar::Png, PngDecoder};
2+
use normeditor::png::{grammar::Png, PngDecoder};
33
use std::{fs, time::Instant};
44

55
fn read_png(image_path: &str) -> Result<Png> {

src/bin/test_suite.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use anyhow::{anyhow, Result};
22
use comfy_table::{Attribute, Cell, Color, Table};
3-
use norm::{
3+
use normeditor::{
44
png::{grammar::Png, PngDecoder},
55
test_file_parser::{parse_test_file, PNGSuiteTestCase},
66
};

src/jpeg/grammar.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ impl From<bool> for Precision {
3131
#[derive(Debug)]
3232
pub struct QuantizationTable {
3333
pub flag: u8,
34-
pub table_elements: [u16; QuantizationTable::NUM_ELEMENTS],
34+
pub table_elements: [u16; Self::NUM_ELEMENTS],
3535
}
3636

3737
impl QuantizationTable {

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use anyhow::{anyhow, Result};
2-
use norm::{
2+
use normeditor::{
33
image::{grammar::ImageKind, ImageReader},
44
renderer,
55
};

src/renderer/app_state.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use winit::event::MouseScrollDelta;
2121
use anyhow::Result;
2222
use winit::{
2323
dpi::PhysicalSize,
24-
event::{ElementState, Event, KeyEvent, Modifiers, MouseButton, WindowEvent},
24+
event::{ElementState, Event, KeyEvent, Modifiers, MouseButton, WindowEvent},
2525
event_loop::EventLoop,
2626
keyboard::{KeyCode, PhysicalKey},
2727
window::{CursorIcon, Window, WindowBuilder},
@@ -206,7 +206,11 @@ impl<'a> AppState<'a> {
206206
// some global rules
207207
// maybe keep a stack of actions?
208208

209-
let draw_mode = if super_key_pressed { false } else { draw_uniform.crosshair() };
209+
let draw_mode = if super_key_pressed {
210+
false
211+
} else {
212+
draw_uniform.crosshair()
213+
};
210214

211215
match event {
212216
WindowEvent::MouseInput { state, button, .. } => {

src/renderer/mouse_state.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pub struct MouseState {
66
position_x: f32,
77
position_y: f32,
88
start_drag: Option<(f32, f32)>,
9-
#[cfg(feature = "camera")]
9+
#[cfg(feature = "camera")]
1010
camera_pan_start: Option<(f32, f32)>,
1111
selected_shape: Option<usize>, // index to the shape stack
1212
clipboard_shape: Option<Circle>, // index to the shape stack
@@ -73,12 +73,12 @@ impl MouseState {
7373
self.clipboard_shape = element_id;
7474
}
7575

76-
#[cfg(feature = "camera")]
76+
#[cfg(feature = "camera")]
7777
pub(crate) const fn camera_pan_start(&self) -> Option<(f32, f32)> {
7878
self.camera_pan_start
7979
}
8080

81-
#[cfg(feature = "camera")]
81+
#[cfg(feature = "camera")]
8282
pub(crate) const fn set_camera_pan_start(&mut self, position: Option<(f32, f32)>) {
8383
self.camera_pan_start = position;
8484
}

0 commit comments

Comments
 (0)