Skip to content

Commit c83eeae

Browse files
Remove rust fmt and rename scripts
1 parent 6b3e3c1 commit c83eeae

24 files changed

Lines changed: 53 additions & 217 deletions

Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,19 @@ name = "iris"
2424
path = "src/main.rs"
2525

2626
[[bin]]
27-
name = "iris-decode"
28-
path = "src/bin/decode.rs"
27+
name = "iris_decode_png"
28+
path = "src/bin/decode_png.rs"
2929

3030
[[bin]]
31-
name = "iris-lato-glyphs"
31+
name = "iris_lato_glyphs"
3232
path = "src/bin/lato_glyphs.rs"
3333

3434
[[bin]]
35-
name = "iris-ssim"
35+
name = "iris_ssim"
3636
path = "src/bin/ssim.rs"
3737

3838
[[bin]]
39-
name = "iris-png-test-suite"
39+
name = "iris_png_test_suite"
4040
path = "src/bin/test_suite.rs"
4141

4242
[lib]

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,17 @@ cargo r --release ./tests/obama.png
2727
```bash
2828

2929
# Profile the decoder
30-
./profile_decoder.sh ./tests/reagan.png
30+
cargo b --release && samply record ./target/release/iris_decode_png ./tests/reagan.png
3131

3232
# Run ad-hoc benchmarks
33-
cargo r --release --bin iris-decode --features time ./tests/Periodic_table_large.png
33+
cargo r --release --bin iris_decode_png --features time ./tests/Periodic_table_large.png
3434

3535
# Parse and render glyphs from the lato font file
3636
# See the generated `glyph_playground` directory.
37-
cargo r --bin iris-lato-glyphs hfkdp!
37+
cargo r --bin iris_lato_glyphs hfkdp!
3838

3939
# Run the PNG test suite
40-
cargo r --bin iris-png-test-suite
40+
cargo r --bin iris_png_test_suite
4141

4242
# Fuzz the decoder
4343
./fuzz.sh

profile.json.gz

1.63 KB
Binary file not shown.

rustfmt.toml

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
1-
use anyhow::{
2-
anyhow,
3-
Result,
4-
};
1+
use anyhow::{anyhow, Result};
52
use iris::png::PngDecoder;
63
#[cfg(feature = "time")]
7-
use iris::util::event_log::{
8-
log_event,
9-
Event,
10-
};
4+
use iris::util::event_log::{log_event, Event};
115
#[cfg(feature = "time")]
126
use std::time::Instant;
137

src/bin/lato_glyphs.rs

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,10 @@
11
use anyhow::Result;
22
use iris::font::{
3-
grammar::{
4-
Glyph,
5-
GlyphData,
6-
SimpleGlyph,
7-
},
3+
grammar::{Glyph, GlyphData, SimpleGlyph},
84
shaper::TrueTypeFontShaper,
95
TrueTypeFontParser,
106
};
11-
use std::{
12-
fs,
13-
fs::File,
14-
io::Write,
15-
path::Path,
16-
};
7+
use std::{fs, fs::File, io::Write, path::Path};
178

189
fn dom_new_canvas(i: usize, width: usize, height: usize) -> String {
1910
let mut out = String::new();

src/bin/ssim.rs

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
1-
use anyhow::{
2-
anyhow,
3-
Result,
4-
};
5-
use iris::png::{
6-
grammar::Png,
7-
PngDecoder,
8-
};
9-
use std::{
10-
fs,
11-
time::Instant,
12-
};
1+
use anyhow::{anyhow, Result};
2+
use iris::png::{grammar::Png, PngDecoder};
3+
use std::{fs, time::Instant};
134

145
fn read_png(image_path: &str) -> Result<Png> {
156
let image_data = fs::read(image_path)?;

src/bin/test_suite.rs

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,10 @@
1-
use anyhow::{
2-
anyhow,
3-
Result,
4-
};
5-
use comfy_table::{
6-
Attribute,
7-
Cell,
8-
Color,
9-
Table,
10-
};
1+
use anyhow::{anyhow, Result};
2+
use comfy_table::{Attribute, Cell, Color, Table};
113
use iris::{
12-
png::{
13-
grammar::Png,
14-
PngDecoder,
15-
},
16-
util::test_file_parser::{
17-
parse_test_file,
18-
PNGSuiteTestCase,
19-
},
20-
};
21-
use std::{
22-
ffi::OsStr,
23-
fmt,
24-
fs,
25-
panic,
4+
png::{grammar::Png, PngDecoder},
5+
util::test_file_parser::{parse_test_file, PNGSuiteTestCase},
266
};
7+
use std::{ffi::OsStr, fmt, fs, panic};
278

289
#[derive(Debug)]
2910
enum TestStatus<'a> {

src/font/shaper.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
use crate::font::grammar::{
2-
Glyph,
3-
TrueTypeFontFile,
4-
};
1+
use crate::font::grammar::{Glyph, TrueTypeFontFile};
52

63
#[derive(Debug)]
74
pub struct TrueTypeFontShaper<'a> {

src/image/reader.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
use crate::{
2-
image::grammar::{
3-
Image,
4-
ImageExt,
5-
ImageKind,
6-
},
2+
image::grammar::{Image, ImageExt, ImageKind},
73
jpeg::JpegDecoder,
84
png::PngDecoder,
95
};

0 commit comments

Comments
 (0)