Skip to content

Commit 5399f49

Browse files
committed
fix(error): Quote literals consistently
1 parent 2d86f96 commit 5399f49

File tree

6 files changed

+17
-17
lines changed

6 files changed

+17
-17
lines changed

examples/derive_ref/interop_tests.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ $ interop_augment_args --unknown
3737
? failed
3838
error: Found argument '--unknown' which wasn't expected, or isn't valid in this context
3939

40-
If you tried to supply `--unknown` as a value rather than a flag, use `-- --unknown`
40+
If you tried to supply '--unknown' as a value rather than a flag, use '-- --unknown'
4141

4242
Usage: interop_augment_args[EXE] [OPTIONS]
4343

@@ -74,7 +74,7 @@ $ interop_augment_subcommands derived --unknown
7474
? failed
7575
error: Found argument '--unknown' which wasn't expected, or isn't valid in this context
7676

77-
If you tried to supply `--unknown` as a value rather than a flag, use `-- --unknown`
77+
If you tried to supply '--unknown' as a value rather than a flag, use '-- --unknown'
7878

7979
Usage: interop_augment_subcommands[EXE] derived [OPTIONS]
8080

@@ -146,7 +146,7 @@ $ interop_hand_subcommand add --unknown
146146
? failed
147147
error: Found argument '--unknown' which wasn't expected, or isn't valid in this context
148148

149-
If you tried to supply `--unknown` as a value rather than a flag, use `-- --unknown`
149+
If you tried to supply '--unknown' as a value rather than a flag, use '-- --unknown'
150150

151151
Usage: interop_hand_subcommand[EXE] add [NAME]...
152152

@@ -245,7 +245,7 @@ $ interop_flatten_hand_args --unknown
245245
? failed
246246
error: Found argument '--unknown' which wasn't expected, or isn't valid in this context
247247

248-
If you tried to supply `--unknown` as a value rather than a flag, use `-- --unknown`
248+
If you tried to supply '--unknown' as a value rather than a flag, use '-- --unknown'
249249

250250
Usage: interop_flatten_hand_args[EXE] [OPTIONS]
251251

src/error/format.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -357,21 +357,21 @@ fn write_dynamic_context(error: &crate::error::Error, styled: &mut StyledStr) ->
357357
if invalid_arg.starts_with('-') {
358358
styled.none("\n\n");
359359
styled.none(TAB);
360-
styled.none("If you tried to supply `");
360+
styled.none("If you tried to supply '");
361361
styled.warning(invalid_arg);
362-
styled.none("` as a value rather than a flag, use `");
362+
styled.none("' as a value rather than a flag, use '");
363363
styled.good("-- ");
364364
styled.good(invalid_arg);
365-
styled.none("`");
365+
styled.none("'");
366366
}
367367

368368
let trailing_arg = error.get(ContextKind::TrailingArg);
369369
if trailing_arg == Some(&ContextValue::Bool(true)) {
370370
styled.none("\n\n");
371371
styled.none(TAB);
372-
styled.none("If you tried to supply `");
372+
styled.none("If you tried to supply '");
373373
styled.warning(invalid_arg);
374-
styled.none("` as a subcommand, remove the '");
374+
styled.none("' as a subcommand, remove the '");
375375
styled.warning("--");
376376
styled.none("' before it.");
377377
}

tests/builder/flags.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ fn issue_1284_argument_in_flag_style() {
160160
const USE_FLAG_AS_ARGUMENT: &str = "\
161161
error: Found argument '--another-flag' which wasn't expected, or isn't valid in this context
162162
163-
If you tried to supply `--another-flag` as a value rather than a flag, use `-- --another-flag`
163+
If you tried to supply '--another-flag' as a value rather than a flag, use '-- --another-flag'
164164
165165
Usage: mycat [OPTIONS] [filename]
166166
@@ -204,7 +204,7 @@ fn issue_2308_multiple_dashes() {
204204
static MULTIPLE_DASHES: &str = "\
205205
error: Found argument '-----' which wasn't expected, or isn't valid in this context
206206
207-
If you tried to supply `-----` as a value rather than a flag, use `-- -----`
207+
If you tried to supply '-----' as a value rather than a flag, use '-- -----'
208208
209209
Usage: test <arg>
210210

tests/builder/opts.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ error: Found argument '--optio' which wasn't expected, or isn't valid in this co
451451
452452
Did you mean '--option'?
453453
454-
If you tried to supply `--optio` as a value rather than a flag, use `-- --optio`
454+
If you tried to supply '--optio' as a value rather than a flag, use '-- --optio'
455455
456456
Usage: clap-test --option <opt>... [positional] [positional2] [positional3]...
457457
@@ -551,7 +551,7 @@ error: Found argument '--files-without-matches' which wasn't expected, or isn't
551551
552552
Did you mean '--files-without-match'?
553553
554-
If you tried to supply `--files-without-matches` as a value rather than a flag, use `-- --files-without-matches`
554+
If you tried to supply '--files-without-matches' as a value rather than a flag, use '-- --files-without-matches'
555555
556556
Usage: ripgrep-616 --files-without-match
557557

tests/builder/subcommands.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ error: Found argument '--subcmarg' which wasn't expected, or isn't valid in this
145145
146146
Did you mean to put '--subcmdarg' after the subcommand 'subcmd'?
147147
148-
If you tried to supply `--subcmarg` as a value rather than a flag, use `-- --subcmarg`
148+
If you tried to supply '--subcmarg' as a value rather than a flag, use '-- --subcmarg'
149149
150150
Usage: dym [COMMAND]
151151
@@ -165,7 +165,7 @@ fn subcmd_did_you_mean_output_arg_false_positives() {
165165
static EXPECTED: &str = "\
166166
error: Found argument '--subcmarg' which wasn't expected, or isn't valid in this context
167167
168-
If you tried to supply `--subcmarg` as a value rather than a flag, use `-- --subcmarg`
168+
If you tried to supply '--subcmarg' as a value rather than a flag, use '-- --subcmarg'
169169
170170
Usage: dym [COMMAND]
171171
@@ -359,7 +359,7 @@ fn subcommand_used_after_double_dash() {
359359
static SUBCMD_AFTER_DOUBLE_DASH: &str = "\
360360
error: Found argument 'subcmd' which wasn't expected, or isn't valid in this context
361361
362-
If you tried to supply `subcmd` as a subcommand, remove the '--' before it.
362+
If you tried to supply 'subcmd' as a subcommand, remove the '--' before it.
363363
364364
Usage: cmd [COMMAND]
365365

tests/ui/error_stderr.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ stdout = ""
55
stderr = """
66
error: Found argument '--unknown-argument' which wasn't expected, or isn't valid in this context
77
8-
If you tried to supply `--unknown-argument` as a value rather than a flag, use `-- --unknown-argument`
8+
If you tried to supply '--unknown-argument' as a value rather than a flag, use '-- --unknown-argument'
99
1010
Usage: stdio-fixture[EXE] [OPTIONS] [COMMAND]
1111

0 commit comments

Comments
 (0)