update dependencies

This commit is contained in:
Lutetium-Vanadium 2022-05-11 17:49:07 +05:30
parent c1505bf21f
commit 01571f6f80
6 changed files with 18 additions and 14 deletions

View File

@ -26,12 +26,14 @@ macro = { package = "requestty-macro", path = "./requestty-macro", optional = tr
tempfile = "3"
smallvec = { version = "1.6", optional = true }
smallvec = { version = "1.8", optional = true }
[dev-dependencies]
trybuild = { version = "1.0.42", features = ["diff"] }
# remove color printing since it messes with the snapshot's colours
insta = { version = "1.7.1", default-features = false }
# restrict to 1.11 due to the change in the working of autogenerated names
# (https://github.com/mitsuhiko/insta/blob/master/CHANGELOG.md#1120)
insta = { version = "=1.11", default-features = false }
rand = "0.8"
rand_chacha = "0.3"

View File

@ -17,5 +17,5 @@ proc-macro = true
proc-macro2 = "1"
syn = { version = "1", features = ["full"] }
quote = "1"
bitflags = "1.2"
bitflags = "1.3"
rustversion = "1.0"

View File

@ -14,16 +14,18 @@ categories = ["command-line-interface", "command-line-utilities"]
exclude = ["*-snapshots"]
[dependencies]
bitflags = "1.2"
textwrap = "0.14"
unicode-segmentation = "1.7"
bitflags = "1.3"
textwrap = "0.15"
unicode-segmentation = "1.9"
crossterm = { version = "0.22", optional = true }
crossterm = { version = "0.23", optional = true }
termion = { version = "1.5", optional = true }
[dev-dependencies]
# remove color printing since it messes with the snapshot's colours
insta = { version = "1.7.1", default-features = false }
# restrict to 1.11 due to the change in the working of autogenerated names
# (https://github.com/mitsuhiko/insta/blob/master/CHANGELOG.md#1120)
insta = { version = "=1.11", default-features = false }
[package.metadata.docs.rs]
rustdoc-args = ["--cfg", "docsrs"]

View File

@ -20,7 +20,7 @@
missing_docs,
missing_debug_implementations,
unreachable_pub,
broken_intra_doc_links
rustdoc::broken_intra_doc_links
)]
#![warn(rust_2018_idioms)]
#![cfg_attr(docsrs, feature(doc_cfg))]

View File

@ -2,7 +2,7 @@
use std::io;
use textwrap::{core::Fragment, word_separators::WordSeparator};
use textwrap::{core::Fragment, WordSeparator};
use crate::{backend::Backend, events::KeyEvent, layout::Layout};
@ -84,8 +84,8 @@ impl<T: std::ops::Deref<Target = str> + ?Sized> Widget for T {
let mut prev_whitespace_len = 0;
let max_width = max_width - 3; // leave space for the '...'
for word in textwrap::word_separators::UnicodeBreakProperties.find_words(self) {
width += word.width() + prev_whitespace_len;
for word in WordSeparator::UnicodeBreakProperties.find_words(self) {
width += word.width() as usize + prev_whitespace_len;
if width > max_width {
break;
}
@ -96,7 +96,7 @@ impl<T: std::ops::Deref<Target = str> + ?Sized> Widget for T {
}
backend.write_all(word.as_bytes())?;
prev_whitespace_len = word.whitespace_width();
prev_whitespace_len = word.whitespace_width() as usize;
}
backend.write_all(b"...")?;

View File

@ -142,7 +142,7 @@
missing_docs,
missing_debug_implementations,
unreachable_pub,
broken_intra_doc_links
rustdoc::broken_intra_doc_links
)]
#![warn(rust_2018_idioms)]
#![cfg_attr(docsrs, feature(doc_cfg))]