Skip to content

Commit ab0107a

Browse files
committed
Switch to string literal
1 parent c62ee35 commit ab0107a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/example/patches.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use anyhow::{Context, Result};
66
use std::{collections::BTreeMap, sync::LazyLock};
77

88
/// Map of patches keyed by name, with the file patches and an optional TOML patch
9-
type PatchMap = BTreeMap<&'static str, (Vec<FilePatch>, Option<String>)>;
9+
type PatchMap = BTreeMap<&'static str, (Vec<FilePatch>, Option<&'static str>)>;
1010

1111
/// The patches, keyed by name
1212
static PATCHES: LazyLock<PatchMap> = LazyLock::new(get_all_patches);
@@ -71,7 +71,7 @@ fn get_all_patches() -> PatchMap {
7171
// The simple example with the ironing-out loop turned on
7272
(
7373
"simple_ironing_out",
74-
(vec![], Some("max_ironing_out_iterations = 10".to_string())),
74+
(vec![], Some("max_ironing_out_iterations = 10")),
7575
),
7676
]
7777
.into_iter()
@@ -84,7 +84,7 @@ pub fn get_patch_names() -> impl Iterator<Item = &'static str> {
8484
}
8585

8686
/// Get patches for the named patched example
87-
pub fn get_patches(name: &str) -> Result<&'static (Vec<FilePatch>, Option<String>)> {
87+
pub fn get_patches(name: &str) -> Result<&'static (Vec<FilePatch>, Option<&'static str>)> {
8888
PATCHES
8989
.get(name)
9090
.with_context(|| format!("Patched example '{name}' not found"))

0 commit comments

Comments
 (0)