From c4c6407211cc061d23bb187c8f17c822237a8207 Mon Sep 17 00:00:00 2001 From: Wiktor Kwapisiewicz Date: Wed, 14 May 2025 12:08:15 +0200 Subject: [PATCH 1/2] Convert `extern crate` to regular `use` statements Since edition 2018 the `extern crate` are not needed to import macros. See: https://doc.rust-lang.org/edition-guide/rust-2018/path-changes.html#macros Signed-off-by: Wiktor Kwapisiewicz --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 908e535e..88025a8e 100644 --- a/README.md +++ b/README.md @@ -17,8 +17,7 @@ easy alternative. ## Usage ```rust -#[macro_use] extern crate log; -extern crate simplelog; +use log::{debug, error, info}; use simplelog::*; From ec3ba39d3e63753f4c673cc58b172ff2f98bd417 Mon Sep 17 00:00:00 2001 From: Wiktor Kwapisiewicz Date: Wed, 14 May 2025 12:09:46 +0200 Subject: [PATCH 2/2] Add `toml` to code blocks for better rendering Signed-off-by: Wiktor Kwapisiewicz --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 88025a8e..4fd19e98 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ and my_rust_binary.log ## Getting Started Just add -``` +```toml [dependencies] simplelog = "^0.12.0" ``` @@ -64,7 +64,7 @@ to your `Cargo.toml` This crate can internally depend on a [paris](https://github.com/0x20F/paris) crate to provide support for ANSI color and styles. To use this feature you need to set a _paris_ feature, like this: -``` +```toml [dependencies] simplelog = { version = "^0.11.0", features = ["paris"] } ```