Skip to content

Commit d5ae7bb

Browse files
HocdocBernhard Berger
andauthored
Remove unneeded extern crates
Closes GH-28. Co-authored-by: Bernhard Berger <[email protected]>
1 parent 34ea284 commit d5ae7bb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+3
-100
lines changed

Untitled.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ micromark.js: `atLineEnding` in html (text) should always eat arbitrary whitespa
66
```rs
77
// ---------------------
88
// Useful helper:
9-
extern crate std;
109
use std::println;
1110
use alloc::string::String;
1211

benches/bench.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
#[macro_use]
2-
extern crate criterion;
3-
use criterion::{BenchmarkId, Criterion};
1+
use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion};
42
use std::fs;
53

64
fn readme(c: &mut Criterion) {

build.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
extern crate reqwest;
21
use regex::Regex;
32
use std::fs;
43

@@ -67,7 +66,6 @@ async fn commonmark() {
6766
// > 👉 **Important**: this module is generated by `build.rs`.
6867
// > It is generate from the latest CommonMark website.
6968
70-
extern crate markdown;
7169
use markdown::{{to_html_with_options, CompileOptions, Options}};
7270
use pretty_assertions::assert_eq;
7371

examples/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
extern crate markdown;
2-
31
fn main() -> Result<(), String> {
42
// Turn on debugging.
53
// You can show it with `RUST_LOG=debug cargo run --example lib`

fuzz/fuzz_targets/markdown.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
#![no_main]
22
use libfuzzer_sys::fuzz_target;
3-
extern crate markdown;
43

54
fuzz_target!(|data: &[u8]| {
65
if let Ok(s) = std::str::from_utf8(data) {
76
let _ = markdown::to_html(s);
8-
let _ = markdown::to_html_with_options(
9-
s,
10-
&markdown::Options::gfm()
11-
);
7+
let _ = markdown::to_html_with_options(s, &markdown::Options::gfm());
128
let _ = markdown::to_mdast(s, &markdown::ParseOptions::default());
139
let _ = markdown::to_mdast(s, &markdown::ParseOptions::gfm());
1410
}

readme.md

Lines changed: 0 additions & 6 deletions

src/configuration.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1236,7 +1236,6 @@ impl Options {
12361236

12371237
#[cfg(test)]
12381238
mod tests {
1239-
extern crate std;
12401239
use super::*;
12411240
use crate::util::mdx::Signal;
12421241
use alloc::format;

src/util/line_ending.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
extern crate alloc;
2-
31
use alloc::{str::FromStr, string::String};
42

53
/// Type of line endings in markdown.
@@ -82,7 +80,6 @@ impl FromStr for LineEnding {
8280

8381
#[cfg(test)]
8482
mod tests {
85-
extern crate std;
8683
use super::*;
8784

8885
#[test]

src/util/mdx.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
extern crate alloc;
2-
31
use alloc::string::String;
42

53
/// Signal used as feedback when parsing MDX ESM/expressions.
@@ -89,7 +87,6 @@ pub type ExpressionParse = dyn Fn(&str, &ExpressionKind) -> Signal;
8987

9088
#[cfg(test)]
9189
mod tests {
92-
extern crate std;
9390
use super::*;
9491
use alloc::boxed::Box;
9592

tests/attention.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
extern crate markdown;
21
use markdown::{
32
mdast::{Emphasis, Node, Paragraph, Root, Strong, Text},
43
to_html, to_html_with_options, to_mdast,

0 commit comments

Comments
 (0)