Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] main from console-rs:main #11

Merged
merged 2 commits into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deny.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[licenses]
allow = ["Apache-2.0", "BSD-3-Clause", "MIT", "Unicode-DFS-2016"]
allow = ["Apache-2.0", "MIT", "Unicode-3.0"]
2 changes: 1 addition & 1 deletion src/draw_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ pub(crate) enum Drawable<'a> {
},
}

impl<'a> Drawable<'a> {
impl Drawable<'_> {
/// Adjust `last_line_count` such that the next draw operation keeps/clears additional lines
pub(crate) fn adjust_last_line_count(&mut self, adjust: LineAdjust) {
let last_line_count: &mut VisualLines = match self {
Expand Down
8 changes: 4 additions & 4 deletions src/style.rs
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ enum WideElement<'a> {
Message { align: &'a Alignment },
}

impl<'a> WideElement<'a> {
impl WideElement<'_> {
fn expand(
self,
cur: String,
Expand Down Expand Up @@ -663,7 +663,7 @@ struct BarDisplay<'a> {
rest: console::StyledObject<RepeatedStringDisplay<'a>>,
}

impl<'a> fmt::Display for BarDisplay<'a> {
impl fmt::Display for BarDisplay<'_> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
for _ in 0..self.filled {
f.write_str(&self.chars[0])?;
Expand All @@ -680,7 +680,7 @@ struct RepeatedStringDisplay<'a> {
num: usize,
}

impl<'a> fmt::Display for RepeatedStringDisplay<'a> {
impl fmt::Display for RepeatedStringDisplay<'_> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
for _ in 0..self.num {
f.write_str(self.str)?;
Expand All @@ -696,7 +696,7 @@ struct PaddedStringDisplay<'a> {
truncate: bool,
}

impl<'a> fmt::Display for PaddedStringDisplay<'a> {
impl fmt::Display for PaddedStringDisplay<'_> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let cols = measure_text_width(self.str);
let excess = cols.saturating_sub(self.width);
Expand Down
Loading