Skip to content

Commit

Permalink
update most dependencies
Browse files Browse the repository at this point in the history
Update everything except for Clap. The change from Clap 2 to 4 is
difficult and requires code changes. These updates are relatively
simple.
  • Loading branch information
webern committed Aug 31, 2023
1 parent b5bf30e commit d7d6674
Show file tree
Hide file tree
Showing 20 changed files with 410 additions and 193 deletions.
544 changes: 397 additions & 147 deletions Cargo.lock

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[package]
name = "cargo-readme"
version = "3.2.0"
edition = "2021"
authors = ["Livio Ribeiro <livioribeiro@outlook.com>"]
description = "A cargo subcommand to generate README.md content from doc comments"
repository = "https://github.com/webern/cargo-readme"
Expand All @@ -11,12 +12,11 @@ license = "MIT OR Apache-2.0"

[dependencies]
clap = "2.32"
toml = "0.5"
regex = "1.0"
serde = "1.0"
serde_derive = "1.0"
percent-encoding = "2.1"
lazy_static = "1.1"
toml = "0.7"
regex = "1"
serde = { version = "1", features = ["derive"] }
percent-encoding = "2"
lazy_static = "1"

[dev-dependencies]
assert_cli = "0.6"
Expand Down
1 change: 1 addition & 0 deletions src/config/manifest.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//! Read crate information from `Cargo.toml`

use serde::Deserialize;
use std::collections::BTreeMap;
use std::fs::File;
use std::io::Read;
Expand Down
2 changes: 1 addition & 1 deletion src/config/project.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::env;
use std::path::{Path, PathBuf};

use config::manifest::{Manifest, ManifestLib};
use crate::config::manifest::{Manifest, ManifestLib};

/// Get the project root from given path or defaults to current directory
///
Expand Down
9 changes: 0 additions & 9 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,15 +142,6 @@
//! By default, `README.tpl` will be used as the template, but you can override it using the
//! `--template` to choose a different template or `--no-template` to disable it.

#[macro_use]
extern crate serde_derive;
#[macro_use]
extern crate lazy_static;

extern crate percent_encoding;
extern crate regex;
extern crate toml;

mod config;
mod readme;

Expand Down
5 changes: 1 addition & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
//! Generate README.md from doc comments.

#[macro_use]
extern crate clap;

extern crate cargo_readme;

use std::io::{self, Write};

use clap::{App, AppSettings, Arg, ArgMatches, SubCommand};
use clap::{crate_version, App, AppSettings, Arg, ArgMatches, SubCommand};

mod helper;

Expand Down
2 changes: 1 addition & 1 deletion src/readme/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ mod extract;
mod process;
mod template;

use config;
use crate::config;

/// Generates readme data from `source` file
///
Expand Down
4 changes: 2 additions & 2 deletions src/readme/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
//! - "```", "```no_run", "```ignore" and "```should_panic" are converted to "```rust"
//! - markdown heading are indentend to be one level lower, so the crate name is at the top level

use std::iter::{IntoIterator, Iterator};

use lazy_static::lazy_static;
use regex::Regex;
use std::iter::{IntoIterator, Iterator};

lazy_static! {
// Is this code block rust?
Expand Down
2 changes: 1 addition & 1 deletion src/readme/template.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use config::Manifest;
use crate::config::Manifest;

/// Renders the template
///
Expand Down
2 changes: 0 additions & 2 deletions tests/alternate-input.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
extern crate assert_cli;

use assert_cli::Assert;

#[test]
Expand Down
2 changes: 0 additions & 2 deletions tests/alternate-template.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
extern crate assert_cli;

use assert_cli::Assert;

const EXPECTED: &str = r#"
Expand Down
2 changes: 0 additions & 2 deletions tests/append-license.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
extern crate assert_cli;

use assert_cli::Assert;

const EXPECTED: &str = r#"
Expand Down
2 changes: 0 additions & 2 deletions tests/badges.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
extern crate assert_cli;

use assert_cli::Assert;

const EXPECTED: &str = r#"
Expand Down
2 changes: 0 additions & 2 deletions tests/default-behavior.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
extern crate assert_cli;

use assert_cli::Assert;

const EXPECTED: &str = r#"
Expand Down
2 changes: 0 additions & 2 deletions tests/entrypoint-resolution.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
extern crate assert_cli;

use assert_cli::Assert;

#[test]
Expand Down
2 changes: 0 additions & 2 deletions tests/multiline-doc.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
extern crate assert_cli;

use assert_cli::Assert;

const EXPECTED: &str = r#"
Expand Down
2 changes: 0 additions & 2 deletions tests/multiple-bin-fail.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
extern crate assert_cli;

use assert_cli::Assert;

const EXPECTED: &str = "Error: Multiple binaries found, choose one: [src/entry1.rs, src/entry2.rs]";
Expand Down
2 changes: 0 additions & 2 deletions tests/no-entrypoint-fail.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
extern crate assert_cli;

use assert_cli::Assert;

const EXPECTED: &str = "Error: No entrypoint found";
Expand Down
2 changes: 0 additions & 2 deletions tests/no-template.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
extern crate assert_cli;

use assert_cli::Assert;

const EXPECTED: &str = r#"
Expand Down
2 changes: 0 additions & 2 deletions tests/project-with-version.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
extern crate assert_cli;

use assert_cli::Assert;

const EXPECTED: &str = "# project-with-version
Expand Down

0 comments on commit d7d6674

Please sign in to comment.