Skip to content

Commit 97b3716

Browse files
committed
Fix MSRV & update changelog
1 parent f763534 commit 97b3716

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
Newer changelog entries can be found [on
44
GitHub](https://github.com/console-rs/console/releases).
55

6+
## 0.16.0
7+
8+
### Enhancements
9+
10+
* Added `slice_str` util.
11+
612
## 0.15.8
713

814
### Enhancements

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "console"
33
description = "A terminal and console abstraction for Rust"
4-
version = "0.15.11"
4+
version = "0.16.0"
55
keywords = ["cli", "terminal", "colors", "console", "ansi"]
66
authors = ["Armin Ronacher <[email protected]>"]
77
license = "MIT"

src/utils.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ fn str_width(s: &str) -> usize {
788788
}
789789

790790
#[cfg(feature = "ansi-parsing")]
791-
fn char_width(c: char) -> usize {
791+
pub(crate) fn char_width(c: char) -> usize {
792792
#[cfg(feature = "unicode-width")]
793793
{
794794
use unicode_width::UnicodeWidthChar;
@@ -898,7 +898,7 @@ pub fn slice_str<'a>(s: &'a str, head: &str, bounds: Range<usize>, tail: &str) -
898898
if head.is_empty() && tail.is_empty() {
899899
Cow::Borrowed(slice)
900900
} else {
901-
Cow::Owned(format!("{head}{slice}{tail}"))
901+
Cow::Owned(format!("{}{}{}", head, slice, tail))
902902
}
903903
}
904904
}

0 commit comments

Comments
 (0)