We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dab90f7 commit 6039399Copy full SHA for 6039399
exercises/conversions/as_ref_mut.rs
@@ -2,13 +2,13 @@
2
// Read more about them at https://doc.rust-lang.org/std/convert/trait.AsRef.html
3
// and https://doc.rust-lang.org/std/convert/trait.AsMut.html, respectively.
4
5
+// I AM NOT DONE
6
// Obtain the number of bytes (not characters) in the given argument
7
// Add the AsRef trait appropriately as a trait bound
8
fn byte_counter<T>(arg: T) -> usize {
9
arg.as_ref().as_bytes().len()
10
}
11
-// I AM NOT DONE
12
// Obtain the number of characters (not bytes) in the given argument
13
14
fn char_counter<T>(arg: T) -> usize {
0 commit comments