Skip to content

Commit dcaa00b

Browse files
committed
More lints
1 parent dbbcbe9 commit dcaa00b

File tree

5 files changed

+31
-32
lines changed

5 files changed

+31
-32
lines changed

crates/bevy_text/src/undo_2/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,4 +259,3 @@ executed is of the form [`Action<T>`];
259259
- Added support for special commands that represent a state setting. See [`SetOrTransition`].
260260

261261
[zaboople]: https://github.com/zaboople/klonk/blob/master/TheGURQ.md
262-

crates/bevy_text/src/undo_2/lib.rs

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ pub enum Action<T> {
7171
/// ```
7272
/// use std::mem::{discriminant, Discriminant};
7373
///
74-
/// use undo_2::{Commands, IndepStateKey, SetOrTransition, SetTransAction};
74+
/// use crate::undo_2::{Commands, IndepStateKey, SetOrTransition, SetTransAction};
7575
///
7676
/// #[derive(Copy, Clone, Debug)]
7777
/// struct State {
@@ -247,7 +247,7 @@ impl<T> Action<T> {
247247
/// # Example
248248
///
249249
/// ```
250-
/// use undo_2::{Commands,CommandItem};
250+
/// use crate::undo_2::{Commands,CommandItem};
251251
///
252252
/// let mut commands = Commands::new();
253253
///
@@ -287,7 +287,7 @@ pub enum CommandItem<T> {
287287
///
288288
/// # Example
289289
/// ```
290-
/// use undo_2::{Action, Commands};
290+
/// use crate::undo_2::{Action, Commands};
291291
///
292292
/// #[derive(Debug, Eq, PartialEq)]
293293
/// enum Command {
@@ -538,7 +538,7 @@ impl<T> Commands<T> {
538538
/// if it is not an Undo.
539539
/// # Example
540540
/// ```
541-
/// use undo_2::{Commands, CommandItem};
541+
/// use crate::undo_2::{Commands, CommandItem};
542542
///
543543
/// #[derive(Debug, Eq, PartialEq)]
544544
/// enum Command {
@@ -568,7 +568,7 @@ impl<T> Commands<T> {
568568
/// if it is not an Undo.
569569
/// # Example
570570
/// ```
571-
/// use undo_2::{Commands, CommandItem};
571+
/// use crate::undo_2::{Commands, CommandItem};
572572
///
573573
/// #[derive(Debug, Eq, PartialEq)]
574574
/// enum Command {
@@ -606,7 +606,7 @@ impl<T> Commands<T> {
606606
///
607607
/// # Example
608608
/// ```
609-
/// use undo_2::{Commands, CommandItem};
609+
/// use crate::undo_2::{Commands, CommandItem};
610610
///
611611
/// #[derive(Debug, Eq, PartialEq)]
612612
/// enum Command {
@@ -653,7 +653,7 @@ impl<T> Commands<T> {
653653
///
654654
/// # Example
655655
/// ```
656-
/// use undo_2::{Commands, CommandItem};
656+
/// use crate::undo_2::{Commands, CommandItem};
657657
///
658658
/// #[derive(Debug, Eq, PartialEq)]
659659
/// enum Command {
@@ -699,7 +699,7 @@ impl<T> Commands<T> {
699699
///
700700
/// # Example
701701
/// ```
702-
/// use undo_2::Commands;
702+
/// use crate::undo_2::Commands;
703703
///
704704
/// #[derive(Debug, Eq, PartialEq)]
705705
/// enum Command {
@@ -724,7 +724,7 @@ impl<T> Commands<T> {
724724
///
725725
/// # Example
726726
/// ```
727-
/// use undo_2::{Action,Commands};
727+
/// use crate::undo_2::{Action,Commands};
728728
///
729729
/// #[derive(Debug, Eq, PartialEq)]
730730
/// enum Command {
@@ -771,7 +771,7 @@ impl<T> Commands<T> {
771771
///
772772
/// # Example
773773
/// ```
774-
/// use undo_2::{Action,Commands};
774+
/// use crate::undo_2::{Action,Commands};
775775
///
776776
/// #[derive(Debug, Eq, PartialEq)]
777777
/// enum Command {
@@ -836,7 +836,7 @@ impl<T> Commands<T> {
836836
///
837837
/// # Example
838838
/// ```
839-
/// use undo_2::{Commands,Action};
839+
/// use crate::undo_2::{Commands,Action};
840840
///
841841
/// #[derive(Debug, Eq, PartialEq)]
842842
/// enum Command {
@@ -912,7 +912,7 @@ impl<T> Commands<T> {
912912
///
913913
/// # Example
914914
/// ```
915-
/// use undo_2::{Action,Commands};
915+
/// use crate::undo_2::{Action,Commands};
916916
///
917917
/// #[derive(Debug, Eq, PartialEq)]
918918
/// enum Command {
@@ -940,7 +940,7 @@ impl<T> Commands<T> {
940940
///
941941
/// # Example
942942
/// ```
943-
/// use undo_2::{Action,Commands};
943+
/// use crate::undo_2::{Action,Commands};
944944
///
945945
/// #[derive(Debug, Eq, PartialEq)]
946946
/// enum Command {
@@ -988,7 +988,7 @@ impl<T> Commands<T> {
988988
///
989989
/// # Example
990990
/// ```
991-
/// use undo_2::{Action,Commands};
991+
/// use crate::undo_2::{Action,Commands};
992992
///
993993
/// #[derive(Debug, Eq, PartialEq)]
994994
/// enum Command {
@@ -1021,7 +1021,7 @@ impl<T> Commands<T> {
10211021
///
10221022
/// # Example
10231023
/// ```
1024-
/// use undo_2::{Action,Commands};
1024+
/// use crate::undo_2::{Action,Commands};
10251025
///
10261026
/// #[derive(Debug, Eq, PartialEq)]
10271027
/// enum Command {
@@ -1058,7 +1058,7 @@ impl<T> Commands<T> {
10581058
///
10591059
/// # Example
10601060
/// ```
1061-
/// use undo_2::Commands;
1061+
/// use crate::undo_2::Commands;
10621062
///
10631063
/// #[derive(Debug, Eq, PartialEq)]
10641064
/// enum Command {
@@ -1094,7 +1094,7 @@ impl<T> Commands<T> {
10941094
///
10951095
/// # Example
10961096
/// ```
1097-
/// use undo_2::Commands;
1097+
/// use crate::undo_2::Commands;
10981098
///
10991099
/// #[derive(Debug, Eq, PartialEq)]
11001100
/// enum Command {
@@ -1123,7 +1123,7 @@ impl<T> Commands<T> {
11231123
///
11241124
/// # Example
11251125
/// ```
1126-
/// use undo_2::Commands;
1126+
/// use crate::undo_2::Commands;
11271127
///
11281128
/// #[derive(Debug, Eq, PartialEq)]
11291129
/// enum Command {
@@ -1149,7 +1149,7 @@ impl<T> Commands<T> {
11491149
///
11501150
/// # Example
11511151
/// ```
1152-
/// use undo_2::*;
1152+
/// use crate::undo_2::*;
11531153
/// #[derive(Debug, Eq, PartialEq)]
11541154
/// enum Command {
11551155
/// A,
@@ -1184,7 +1184,7 @@ impl<T> Commands<T> {
11841184
/// the [CommandItem] index passed `index`.
11851185
///
11861186
/// ```
1187-
/// use undo_2::{Action,Commands, CommandItem};
1187+
/// use crate::undo_2::{Action,Commands, CommandItem};
11881188
/// use std::time::{Instant, Duration};
11891189
///
11901190
/// #[derive(Debug, Eq, PartialEq)]
@@ -1248,7 +1248,7 @@ impl<T> Commands<T> {
12481248
/// # Example
12491249
///
12501250
/// ```
1251-
/// use undo_2::Commands;
1251+
/// use crate::undo_2::Commands;
12521252
///
12531253
/// #[derive(Debug, Eq, PartialEq)]
12541254
/// enum Command {
@@ -1279,7 +1279,7 @@ impl<T> Commands<T> {
12791279
/// Complexity: O(n)
12801280
///
12811281
/// ```
1282-
/// use undo_2::Commands;
1282+
/// use crate::undo_2::Commands;
12831283
/// use std::time::{Instant, Duration};
12841284
///
12851285
/// #[derive(Debug, Eq, PartialEq)]
@@ -1348,7 +1348,7 @@ impl<T> Commands<T> {
13481348
/// Complexity: O(n)
13491349
///
13501350
/// ```
1351-
/// use undo_2::Commands;
1351+
/// use crate::undo_2::Commands;
13521352
/// use std::time::{Instant, Duration};
13531353
///
13541354
/// #[derive(Debug, Eq, PartialEq)]
@@ -1414,7 +1414,7 @@ impl<T> Commands<T> {
14141414
/// Complexity: O(n)
14151415
///
14161416
/// ```
1417-
/// use undo_2::Commands;
1417+
/// use crate::undo_2::Commands;
14181418
/// use std::time::{Instant, Duration};
14191419
///
14201420
/// #[derive(Debug, Eq, PartialEq)]
@@ -1504,7 +1504,7 @@ impl<T> Commands<T> {
15041504
/// The iterator would iterator over the sequence [C, A].
15051505
///
15061506
/// ```
1507-
/// use undo_2::Commands;
1507+
/// use crate::undo_2::Commands;
15081508
///
15091509
/// #[derive(Debug, Eq, PartialEq)]
15101510
/// enum Command {
@@ -1555,7 +1555,7 @@ impl<T> Commands<T> {
15551555
/// # Example
15561556
///
15571557
/// ```
1558-
/// use undo_2::{Commands, CommandItem, Merge, IterRealized};
1558+
/// use crate::undo_2::{Commands, CommandItem, Merge, IterRealized};
15591559
/// use std::ops::ControlFlow;
15601560
///
15611561
/// #[derive(Eq, PartialEq, Debug)]
@@ -1623,7 +1623,7 @@ impl<T> Commands<T> {
16231623
/// # Example
16241624
///
16251625
/// ```
1626-
/// use undo_2::{Commands, CommandItem, Splice, IterRealized};
1626+
/// use crate::undo_2::{Commands, CommandItem, Splice, IterRealized};
16271627
/// use std::ops::ControlFlow;
16281628
///
16291629
/// // we suppose that A, B, C is equivalent to D,E
@@ -1715,7 +1715,7 @@ impl<T> Commands<T> {
17151715
///
17161716
/// # Example
17171717
/// ```
1718-
/// use undo_2::{CommandItem, Commands};
1718+
/// use crate::undo_2::{CommandItem, Commands};
17191719
///
17201720
/// #[derive(Debug, PartialEq)]
17211721
/// enum Command {
@@ -1743,7 +1743,7 @@ impl<T> Commands<T> {
17431743
///
17441744
/// # Example
17451745
/// ```
1746-
/// use undo_2::{Commands,CommandItem};
1746+
/// use crate::undo_2::{Commands,CommandItem};
17471747
///
17481748
/// #[derive(Debug, PartialEq)]
17491749
/// enum Command {

crates/bevy_text/src/undo_2/tests/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ mod redo;
44
mod remove_undone;
55
mod set_and_transition;
66
mod splice;
7-
mod tests;
87
mod unbuild;
98
mod undo;
9+
mod undo_tests;

crates/bevy_text/src/undo_2/tests/redo.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,5 +79,5 @@ fn redo_all() {
7979
commands.undo();
8080

8181
let v: Vec<_> = commands.redo_all().collect();
82-
assert_eq!(v, [Do(&A), Do(&Command::B)]);
82+
assert_eq!(v, [Do(&A), Do(&B)]);
8383
}

0 commit comments

Comments
 (0)