Skip to content

Commit d5b6990

Browse files
authored
Merge pull request #54 from ynqa/v0.8.0/dev
v0.8.0
2 parents 21b8234 + fb7b3ae commit d5b6990

File tree

11 files changed

+38
-133
lines changed

11 files changed

+38
-133
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- uses: actions/checkout@v2
11-
- uses: actions/cache@v2
11+
- uses: actions/cache@v4
1212
with:
1313
path: |
1414
~/.cargo/registry

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Put the package in your `Cargo.toml`.
1111

1212
```toml
1313
[dependencies]
14-
promkit = "0.7.0"
14+
promkit = "0.8.0"
1515
```
1616

1717
## Features

promkit-derive/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ proc-macro = true
1515
syn = { version = "2.0.52", features = ["full"] }
1616
quote = "1.0"
1717
proc-macro2 = "1.0"
18-
promkit = { path = "../promkit", version = "0.7.0" }
18+
promkit = { path = "../promkit", version = "0.8.0" }

promkit/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "promkit"
3-
version = "0.7.0"
3+
version = "0.8.0"
44
authors = ["ynqa <[email protected]>"]
55
edition = "2021"
66
description = "A toolkit for building your own interactive command-line tools"

promkit/src/core/text/state.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use super::Text;
66
///
77
/// This state encapsulates the properties and
88
/// behaviors specific to text handling,
9-
#[derive(Clone)]
9+
#[derive(Clone, Default)]
1010
pub struct State {
1111
/// The text to be rendered.
1212
pub text: Text,

promkit/src/core/text_editor/state.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use crate::{crossterm::style::ContentStyle, grapheme::StyledGraphemes, pane::Pan
44

55
use super::{History, Mode, TextEditor};
66

7-
#[derive(Clone)]
7+
#[derive(Clone, Default)]
88
pub struct State {
99
/// The `TextEditor` component to be rendered.
1010
pub texteditor: TextEditor,

promkit/src/grapheme.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,6 @@ impl StyledGraphemes {
233233
/// - with the style applied to all occurrences of the query if the query is found.
234234
/// - unchanged if the query string is empty.
235235
/// - `None`: if the query string is not found in the collection.
236-
237236
pub fn highlight<S: AsRef<str>>(mut self, query: S, style: ContentStyle) -> Option<Self> {
238237
let query_str = query.as_ref();
239238
if query_str.is_empty() {
@@ -324,7 +323,7 @@ pub struct StyledGraphemesDisplay<'a> {
324323
styled_graphemes: &'a StyledGraphemes,
325324
}
326325

327-
impl<'a> fmt::Display for StyledGraphemesDisplay<'a> {
326+
impl fmt::Display for StyledGraphemesDisplay<'_> {
328327
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
329328
for styled_grapheme in self.styled_graphemes.iter() {
330329
write!(f, "{}", styled_grapheme.style.apply(styled_grapheme.ch))?;

promkit/src/jsonz.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ pub struct PathIterator<'a> {
395395
stack: Vec<(String, &'a serde_json::Value)>,
396396
}
397397

398-
impl<'a> PathIterator<'a> {
398+
impl PathIterator<'_> {
399399
fn escape_json_path_key(key: &str) -> String {
400400
if key.contains('.') || key.contains('-') || key.contains('@') {
401401
format!("\"{}\"", key)
@@ -405,7 +405,7 @@ impl<'a> PathIterator<'a> {
405405
}
406406
}
407407

408-
impl<'a> Iterator for PathIterator<'a> {
408+
impl Iterator for PathIterator<'_> {
409409
type Item = String;
410410

411411
fn next(&mut self) -> Option<Self::Item> {

promkit/src/keymap.rs

Lines changed: 0 additions & 94 deletions
This file was deleted.

promkit/src/lib.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,21 @@
1111
//!
1212
//! ```toml
1313
//! [dependencies]
14-
//! promkit = "0.7.0"
14+
//! promkit = "0.8.0"
1515
//! ```
1616
//!
1717
//! ## Features
1818
//!
1919
//! - Support cross-platform both UNIX and Windows owing to [crossterm](https://github.com/crossterm-rs/crossterm)
2020
//! - Various building methods
2121
//! - Preset; Support for quickly setting up a UI by providing simple parameters.
22-
//! - [Readline](https://github.com/ynqa/promkit/tree/v0.7.0#readline)
23-
//! - [Confirm](https://github.com/ynqa/promkit/tree/v0.7.0#confirm)
24-
//! - [Password](https://github.com/ynqa/promkit/tree/v0.7.0#password)
25-
//! - [Select](https://github.com/ynqa/promkit/tree/v0.7.0#select)
26-
//! - [QuerySelect](https://github.com/ynqa/promkit/tree/v0.7.0#queryselect)
27-
//! - [Checkbox](https://github.com/ynqa/promkit/tree/v0.7.0#checkbox)
28-
//! - [Tree](https://github.com/ynqa/promkit/tree/v0.7.0#tree)
22+
//! - [Readline](https://github.com/ynqa/promkit/tree/v0.8.0#readline)
23+
//! - [Confirm](https://github.com/ynqa/promkit/tree/v0.8.0#confirm)
24+
//! - [Password](https://github.com/ynqa/promkit/tree/v0.8.0#password)
25+
//! - [Select](https://github.com/ynqa/promkit/tree/v0.8.0#select)
26+
//! - [QuerySelect](https://github.com/ynqa/promkit/tree/v0.8.0#queryselect)
27+
//! - [Checkbox](https://github.com/ynqa/promkit/tree/v0.8.0#checkbox)
28+
//! - [Tree](https://github.com/ynqa/promkit/tree/v0.8.0#tree)
2929
//! - Combining various UI components.
3030
//! - They are provided with the same interface, allowing users to choose and
3131
//! assemble them according to their preferences.
@@ -39,7 +39,7 @@
3939
//!
4040
//! ## Examples/Demos
4141
//!
42-
//! See [here](https://github.com/ynqa/promkit/tree/v0.7.0#examplesdemos)
42+
//! See [here](https://github.com/ynqa/promkit/tree/v0.8.0#examplesdemos)
4343
//!
4444
//! ## Why *promkit*?
4545
//!

0 commit comments

Comments
 (0)