Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/stdx/src/non_empty_vec.rs')
-rw-r--r--crates/stdx/src/non_empty_vec.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/stdx/src/non_empty_vec.rs b/crates/stdx/src/non_empty_vec.rs
index 342194c783..faa322d9e7 100644
--- a/crates/stdx/src/non_empty_vec.rs
+++ b/crates/stdx/src/non_empty_vec.rs
@@ -8,8 +8,8 @@ pub struct NonEmptyVec<T> {
impl<T> NonEmptyVec<T> {
#[inline]
- pub fn new(first: T) -> Self {
- NonEmptyVec { first, rest: Vec::new() }
+ pub const fn new(first: T) -> Self {
+ Self { first, rest: Vec::new() }
}
#[inline]
@@ -24,7 +24,7 @@ impl<T> NonEmptyVec<T> {
#[inline]
pub fn push(&mut self, value: T) {
- self.rest.push(value)
+ self.rest.push(value);
}
#[inline]