Skip to content

Commit f4696c4

Browse files
Fix now unnecessary LenType definitions
1 parent 7679751 commit f4696c4

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/string/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -368,15 +368,15 @@ impl<LenT: LenType, S: StringStorage + ?Sized> StringInner<LenT, S> {
368368
/// ```rust
369369
/// # use heapless::string::{String, StringView};
370370
/// let s: String<10, _> = String::try_from("hello").unwrap();
371-
/// let view: &StringView<u8> = s.as_view();
371+
/// let view: &StringView = s.as_view();
372372
/// ```
373373
///
374374
/// It is often preferable to do the same through type coerction, since `String<N>` implements `Unsize<StringView>`:
375375
///
376376
/// ```rust
377377
/// # use heapless::string::{String, StringView};
378378
/// let s: String<10, _> = String::try_from("hello").unwrap();
379-
/// let view: &StringView<u8> = &s;
379+
/// let view: &StringView = &s;
380380
/// ```
381381
#[inline]
382382
pub fn as_view(&self) -> &StringView<LenT> {
@@ -389,15 +389,15 @@ impl<LenT: LenType, S: StringStorage + ?Sized> StringInner<LenT, S> {
389389
/// ```rust
390390
/// # use heapless::string::{String, StringView};
391391
/// let mut s: String<10> = String::try_from("hello").unwrap();
392-
/// let view: &mut StringView<_> = s.as_mut_view();
392+
/// let view: &mut StringView = s.as_mut_view();
393393
/// ```
394394
///
395395
/// It is often preferable to do the same through type coerction, since `String<N>` implements `Unsize<StringView>`:
396396
///
397397
/// ```rust
398398
/// # use heapless::string::{String, StringView};
399399
/// let mut s: String<10> = String::try_from("hello").unwrap();
400-
/// let view: &mut StringView<_> = &mut s;
400+
/// let view: &mut StringView = &mut s;
401401
/// ```
402402
#[inline]
403403
pub fn as_mut_view(&mut self) -> &mut StringView<LenT> {

src/vec/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1805,7 +1805,7 @@ mod tests {
18051805
{
18061806
let v: Vec<Droppable, 2> = Vec::new();
18071807
let v: Box<Vec<Droppable, 2>> = Box::new(v);
1808-
let mut v: Box<VecView<Droppable, usize>> = v;
1808+
let mut v: Box<VecView<Droppable>> = v;
18091809
v.push(Droppable::new()).ok().unwrap();
18101810
v.push(Droppable::new()).ok().unwrap();
18111811
assert_eq!(Droppable::count(), 2);
@@ -1818,7 +1818,7 @@ mod tests {
18181818
{
18191819
let v: Vec<Droppable, 2> = Vec::new();
18201820
let v: Box<Vec<Droppable, 2>> = Box::new(v);
1821-
let mut v: Box<VecView<Droppable, usize>> = v;
1821+
let mut v: Box<VecView<Droppable>> = v;
18221822
v.push(Droppable::new()).ok().unwrap();
18231823
v.push(Droppable::new()).ok().unwrap();
18241824
assert_eq!(Droppable::count(), 2);

0 commit comments

Comments
 (0)