Skip to content

Commit b5061c5

Browse files
chore(deps): update stability requirement from 0.1.1 to 0.2.0 (#1021)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Josh McKinney <[email protected]>
1 parent 359204c commit b5061c5

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ unicode-segmentation = "1.10"
3939
unicode-width = "0.1"
4040
document-features = { version = "0.2.7", optional = true }
4141
lru = "0.12.0"
42-
stability = "0.1.1"
42+
stability = "0.2.0"
4343
compact_str = "0.7.1"
4444

4545
[dev-dependencies]

src/widgets/paragraph.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,8 @@ impl<'a> Paragraph<'a> {
256256
/// need in order to be fully rendered. For paragraphs that do not use wrapping, this count is
257257
/// simply the number of lines present in the paragraph.
258258
///
259+
/// Note: The design for text wrapping is not stable and might affect this API.
260+
///
259261
/// # Example
260262
///
261263
/// ```ignore
@@ -267,7 +269,6 @@ impl<'a> Paragraph<'a> {
267269
/// ```
268270
#[stability::unstable(
269271
feature = "rendered-line-info",
270-
reason = "The design for text wrapping is not stable and might affect this API.",
271272
issue = "https://github.com/ratatui-org/ratatui/issues/293"
272273
)]
273274
pub fn line_count(&self, width: u16) -> usize {
@@ -297,6 +298,8 @@ impl<'a> Paragraph<'a> {
297298

298299
/// Calculates the shortest line width needed to avoid any word being wrapped or truncated.
299300
///
301+
/// Note: The design for text wrapping is not stable and might affect this API.
302+
///
300303
/// # Example
301304
///
302305
/// ```ignore
@@ -309,7 +312,6 @@ impl<'a> Paragraph<'a> {
309312
/// ```
310313
#[stability::unstable(
311314
feature = "rendered-line-info",
312-
reason = "The design for text wrapping is not stable and might affect this API.",
313315
issue = "https://github.com/ratatui-org/ratatui/issues/293"
314316
)]
315317
pub fn line_width(&self) -> usize {

tests/widgets_paragraph.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ fn widgets_paragraph_can_wrap_with_a_trailing_nbsp() {
9999
#[test]
100100
fn widgets_paragraph_can_scroll_horizontally() {
101101
let text =
102-
Text::from("段落现在可以水平滚动了!\nParagraph can scroll horizontally!\nShort line");
102+
Text::from("段落现在可以水平滚动了!\nParagraph can scroll horizontally!\nLittle line");
103103
let paragraph = Paragraph::new(text).block(Block::default().borders(Borders::ALL));
104104

105105
test_case(
@@ -108,7 +108,7 @@ fn widgets_paragraph_can_scroll_horizontally() {
108108
"┌──────────────────┐",
109109
"│在可以水平滚动了!│",
110110
"│ph can scroll hori│",
111-
"│ine │",
111+
"│line │",
112112
"│ │",
113113
"│ │",
114114
"│ │",
@@ -124,7 +124,7 @@ fn widgets_paragraph_can_scroll_horizontally() {
124124
"┌──────────────────┐",
125125
"│段落现在可以水平滚│",
126126
"│Paragraph can scro│",
127-
"│ Short line│",
127+
"│ Little line│",
128128
"│ │",
129129
"│ │",
130130
"│ │",

0 commit comments

Comments
 (0)