Skip to content

Commit 98b8fb5

Browse files
authored
grep: remove 'static for statics (#1005)
clippy: warning: statics have by default a `'static` lifetime note: `#[warn(clippy::redundant_static_lifetimes)]` on by default help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
1 parent 6a93b85 commit 98b8fb5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

exercises/grep/tests/grep.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use grep::{grep, Flags};
22

33
use std::fs;
44

5-
static ILIAD_CONTENT: &'static str = "Achilles sing, O Goddess! Peleus' son;
5+
static ILIAD_CONTENT: &str = "Achilles sing, O Goddess! Peleus' son;
66
His wrath pernicious, who ten thousand woes
77
Caused to Achaia's host, sent many a soul
88
Illustrious into Ades premature,
@@ -13,7 +13,7 @@ The noble Chief Achilles from the son
1313
Of Atreus, Agamemnon, King of men.
1414
";
1515

16-
static MIDSUMMER_NIGHT_CONTENT: &'static str = "I do entreat your grace to pardon me.
16+
static MIDSUMMER_NIGHT_CONTENT: &str = "I do entreat your grace to pardon me.
1717
I know not by what power I am made bold,
1818
Nor how it may concern my modesty,
1919
In such a presence here to plead my thoughts;
@@ -22,7 +22,7 @@ The worst that may befall me in this case,
2222
If I refuse to wed Demetrius.
2323
";
2424

25-
static PARADISE_LOST_CONTENT: &'static str = "Of Mans First Disobedience, and the Fruit
25+
static PARADISE_LOST_CONTENT: &str = "Of Mans First Disobedience, and the Fruit
2626
Of that Forbidden Tree, whose mortal tast
2727
Brought Death into the World, and all our woe,
2828
With loss of Eden, till one greater Man
@@ -36,7 +36,7 @@ That Shepherd, who first taught the chosen Seed
3636
/// A poem by Alexander Blok(https://en.wikipedia.org/wiki/Alexander_Blok)
3737
/// a Russian poet who is regarded as one of the most important figures of the Silver Age of Russian Poetry
3838
/// You can read the translation here: https://lyricstranslate.com/ru/белой-ночью-месяц-красный-white-night-crimson-crescent.html
39-
static IN_THE_WHITE_NIGHT_CONTENT: &'static str = "Белой ночью месяц красный
39+
static IN_THE_WHITE_NIGHT_CONTENT: &str = "Белой ночью месяц красный
4040
Выплывает в синеве.
4141
Бродит призрачно-прекрасный,
4242
Отражается в Неве.

0 commit comments

Comments
 (0)