Skip to content

Commit

Permalink
chore(deps): bump rustyline from 14.0.0 to 15.0.0 in /datafusion-cli (#…
Browse files Browse the repository at this point in the history
…14265)

* chore(deps): bump rustyline from 14.0.0 to 15.0.0 in /datafusion-cli

Bumps [rustyline](https://github.com/kkawakam/rustyline) from 14.0.0 to 15.0.0.
- [Release notes](https://github.com/kkawakam/rustyline/releases)
- [Changelog](https://github.com/kkawakam/rustyline/blob/master/History.md)
- [Commits](kkawakam/rustyline@v14.0.0...v15.0.0)

---
updated-dependencies:
- dependency-name: rustyline
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* fix build

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: jonahgao <[email protected]>
Co-authored-by: Andrew Lamb <[email protected]>
  • Loading branch information
3 people authored Jan 29, 2025
1 parent 707f673 commit 99f907b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 27 deletions.
30 changes: 9 additions & 21 deletions datafusion-cli/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 datafusion-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ object_store = { version = "0.11.0", features = ["aws", "gcp", "http"] }
parking_lot = { version = "0.12" }
parquet = { version = "54.0.0", default-features = false }
regex = "1.8"
rustyline = "14.0"
rustyline = "15.0"
tokio = { version = "1.24", features = ["macros", "rt", "rt-multi-thread", "sync", "parking_lot", "signal"] }
url = "2.5.4"

Expand Down
6 changes: 3 additions & 3 deletions datafusion-cli/src/helper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use datafusion::sql::sqlparser::parser::ParserError;

use rustyline::completion::{Completer, FilenameCompleter, Pair};
use rustyline::error::ReadlineError;
use rustyline::highlight::Highlighter;
use rustyline::highlight::{CmdKind, Highlighter};
use rustyline::hint::Hinter;
use rustyline::validate::{ValidationContext, ValidationResult, Validator};
use rustyline::{Context, Helper, Result};
Expand Down Expand Up @@ -118,8 +118,8 @@ impl Highlighter for CliHelper {
self.highlighter.highlight(line, pos)
}

fn highlight_char(&self, line: &str, pos: usize, forced: bool) -> bool {
self.highlighter.highlight_char(line, pos, forced)
fn highlight_char(&self, line: &str, pos: usize, kind: CmdKind) -> bool {
self.highlighter.highlight_char(line, pos, kind)
}
}

Expand Down
4 changes: 2 additions & 2 deletions datafusion-cli/src/highlighter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use datafusion::sql::sqlparser::{
keywords::Keyword,
tokenizer::{Token, Tokenizer},
};
use rustyline::highlight::Highlighter;
use rustyline::highlight::{CmdKind, Highlighter};

/// The syntax highlighter.
#[derive(Debug)]
Expand Down Expand Up @@ -73,7 +73,7 @@ impl Highlighter for SyntaxHighlighter {
}
}

fn highlight_char(&self, line: &str, _pos: usize, _forced: bool) -> bool {
fn highlight_char(&self, line: &str, _pos: usize, _cmd: CmdKind) -> bool {
!line.is_empty()
}
}
Expand Down

0 comments on commit 99f907b

Please sign in to comment.