Skip to content

Commit 0b74489

Browse files
authored
Move forbid(unsafe_code) to the crate root (#13)
1 parent 56f1121 commit 0b74489

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

src/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
//! // Now you can use the image crate as normal
1515
//! let img = image::open("path/to/image.pcx").unwrap();
1616
//! ```
17-
use image::Limits;
17+
18+
#![forbid(unsafe_code)]
1819

1920
#[cfg(feature = "pcx")]
2021
pub mod pcx;
@@ -44,7 +45,7 @@ pub fn register() {
4445
Box::new(|r| {
4546
Ok(Box::new(ora::OpenRasterDecoder::with_limits(
4647
r,
47-
Limits::no_limits(),
48+
image::Limits::no_limits(),
4849
)?))
4950
}),
5051
);

src/ora.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
//! # Related Links
1010
//! * <https://en.wikipedia.org/wiki/OpenRaster> - The OpenRaster format on Wikipedia
1111
//! * <https://www.openraster.org/> - OpenRaster specification
12-
#![forbid(unsafe_code)]
12+
1313
use image::codecs::png::PngDecoder;
1414
use image::error::{DecodingError, ImageFormatHint, UnsupportedError};
1515
use image::metadata::Orientation;

src/xbm.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
//! # Related Links
99
//! * <https://www.x.org/releases/X11R7.7/doc/libX11/libX11/libX11.html#Manipulating_Bitmaps> - The XBM format specification
1010
//! * <https://en.wikipedia.org/wiki/X_BitMap> - The XBM format on wikipedia
11-
#![forbid(unsafe_code)]
1211
1312
use std::fmt;
1413
use std::io::{BufRead, Bytes};

src/xpm/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
//! * <https://gitlab.freedesktop.org/xorg/app/rgb/raw/master/rgb.txt> - X color names
4747
//! * <https://www.x.org/wiki/X11R4/#index10h4> - Introduction of modern X11 color name table
4848
//! * <https://web.archive.org/web/20070808230118/http://koala.ilog.fr/ftp/pub/xpm/> - more historical XPM material
49-
#![forbid(unsafe_code)]
5049
5150
mod x11r6colors;
5251

0 commit comments

Comments
 (0)