MCPcopy Create free account
hub / github.com/SoftbearStudios/bitcode / array_string

Function array_string

src/ext/arrayvec.rs:180–189  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

178 // Smaller set of tests for ArrayString than ArrayVec they share VecEncoder/LengthDecoder.
179 #[test]
180 fn array_string() {
181 let mut v = ArrayString::<2>::default();
182 v.push('0');
183 v.push('1');
184 let b = encode(&v);
185 assert!(decode::<ArrayString<1>>(&b).is_err());
186 assert_eq!(decode::<ArrayString<2>>(&b).unwrap(), v);
187 assert_eq!(decode::<ArrayString<3>>(&b).unwrap().as_str(), v.as_str());
188 assert!(decode::<ArrayString<0>>(&encode(&ArrayString::<0>::default())).is_ok());
189 }
190
191 #[test]
192 fn array_vec() {

Callers

nothing calls this directly

Calls 1

encodeFunction · 0.85

Tested by

no test coverage detected