mirror of
https://github.com/nushell/nushell.git
synced 2025-08-11 08:44:39 +02:00
Fix typos and use more idiomatic assertions (#7755)
I have changed `assert!(a == b)` calls to `assert_eq!(a, b)`, which give better error messages. Similarly for `assert!(a != b)` and `assert_ne!(a, b)`. Basically all instances were comparing primitives (string slices or integers), so there is no loss of generality from special-case macros, I have also fixed a number of typos in comments, variable names, and a few user-facing messages.
This commit is contained in:
@ -7,7 +7,7 @@ pub fn string_width(text: &str) -> usize {
|
||||
pub fn string_wrap(text: &str, width: usize, keep_words: bool) -> String {
|
||||
// todo: change me...
|
||||
//
|
||||
// well... it's not effitient to build a table to wrap a string,
|
||||
// well... it's not efficient to build a table to wrap a string,
|
||||
// but ... it's better than a copy paste (is it?)
|
||||
|
||||
if text.is_empty() {
|
||||
|
Reference in New Issue
Block a user