Skip to content

Commit

Permalink
Merge pull request #1318 from charlespierce/update_textwrap
Browse files Browse the repository at this point in the history
Bump textwrap to 0.15.1
  • Loading branch information
charlespierce authored Sep 16, 2022
2 parents 6bf00bc + 45c9945 commit dab233a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
17 changes: 14 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/volta-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ sha-1 = "0.10.0"
hex = "0.4.3"
chrono = "0.4.22"
validate-npm-package-name = { path = "../validate-npm-package-name" }
textwrap = "0.14.2"
textwrap = "0.15.1"
atty = "0.2"
log = { version = "0.4", features = ["std"] }
ctrlc = "3.2.2"
Expand Down
5 changes: 2 additions & 3 deletions crates/volta-core/src/log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ use console::style;
use log::{Level, LevelFilter, Log, Metadata, Record, SetLoggerError};
use std::env;
use std::fmt::Display;
use textwrap::word_splitters::NoHyphenation;
use textwrap::{fill, Options};
use textwrap::{fill, Options, WordSplitter};

use crate::style::text_width;

Expand Down Expand Up @@ -127,7 +126,7 @@ where
match text_width() {
Some(width) => {
let options = Options::new(width)
.word_splitter(NoHyphenation)
.word_splitter(WordSplitter::NoHyphenation)
.subsequent_indent(WRAP_INDENT)
.break_words(false);

Expand Down

0 comments on commit dab233a

Please sign in to comment.