Skip to content

Commit f602e84

Browse files
committed
Remove obsolete extern crate oxipng advice in lib usage instructions
This syntax hasn't been required since at least Rust's 2018 edition, except in very specialized scenarios where you want to convince the compiler that a crate is actually used to guarantee that the side-effects of its build script (e.g., library linking) are visible, which do not apply to Oxipng in any case.
1 parent e367f23 commit f602e84

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

README.md

+5-7
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,11 @@ docker run --rm -v $(pwd):/work ghcr.io/shssoichiro/oxipng -o 4 /work/file.png
106106
## Library Usage
107107

108108
Although originally intended to be used as an executable, Oxipng can also be used as a library in
109-
other Rust projects. To do so, simply add Oxipng as a dependency in your Cargo.toml,
110-
then `extern crate oxipng` in your project. You should then have access to all of the library
111-
functions [documented here](https://docs.rs/oxipng). The simplest
112-
method of usage involves creating an
113-
[Options struct](https://docs.rs/oxipng/latest/oxipng/struct.Options.html) and
114-
passing it, along with an input filename, into the
115-
[optimize function](https://docs.rs/oxipng/latest/oxipng/fn.optimize.html).
109+
other Rust projects. To do so, simply add Oxipng as a dependency in your Cargo.toml. You should then
110+
have access to all of the library functions [documented here](https://docs.rs/oxipng). The simplest
111+
method of usage involves creating an [Options
112+
struct](https://docs.rs/oxipng/latest/oxipng/struct.Options.html) and passing it, along with an
113+
input filename, into the [optimize function](https://docs.rs/oxipng/latest/oxipng/fn.optimize.html).
116114

117115
It is recommended to disable the "binary" feature when including Oxipng as a library. Currently, there is
118116
no simple way to just disable one feature in Cargo, it has to be done by disabling default features

0 commit comments

Comments
 (0)