@@ -111,7 +111,7 @@ impl<const N: usize> StaticString<N> {
111
111
/// ```
112
112
#[ allow( clippy:: should_implement_trait) ]
113
113
#[ inline( always) ]
114
- pub const fn from_str < S : ~ const AsRef < str > + ~ const Drop > ( string : S ) -> Self {
114
+ pub fn from_str < S : AsRef < str > > ( string : S ) -> Self {
115
115
let mut res = Self :: new ( ) ;
116
116
let string_ref = string. as_ref ( ) ;
117
117
unsafe {
@@ -559,7 +559,7 @@ impl<const N: usize> StaticString<N> {
559
559
/// assert_eq!(s, "foobar");
560
560
/// ```
561
561
#[ inline]
562
- pub const fn push_str < S : ~ const AsRef < str > + ~ const Drop > ( & mut self , string : S ) {
562
+ pub fn push_str < S : AsRef < str > > ( & mut self , string : S ) {
563
563
// Note that when calling this at runtime, the compiler still just sees the signature
564
564
// as `push_str<S: AsRef<str>>(&mut self, string: S)`. Adding new `~const` bounds is only
565
565
// a "breaking change" if you add them to something that was *already* a `const fn`. Adding
@@ -592,7 +592,7 @@ impl<const N: usize> StaticString<N> {
592
592
/// # }
593
593
/// ```
594
594
#[ inline( always) ]
595
- pub const fn push_str_truncating < S : ~ const AsRef < str > + ~ const Drop > ( & mut self , string : S ) {
595
+ pub fn push_str_truncating < S : AsRef < str > > ( & mut self , string : S ) {
596
596
unsafe { self . push_str_unchecked ( truncate_str ( string. as_ref ( ) , self . remaining_capacity ( ) ) ) } ;
597
597
}
598
598
@@ -609,10 +609,7 @@ impl<const N: usize> StaticString<N> {
609
609
/// assert!(s.try_push_str("0".repeat(300)).is_err());
610
610
/// ```
611
611
#[ inline( always) ]
612
- pub const fn try_push_str < S : ~const AsRef < str > + ~const Drop > (
613
- & mut self ,
614
- string : S ,
615
- ) -> Result < ( ) , CapacityError < N > > {
612
+ pub fn try_push_str < S : AsRef < str > > ( & mut self , string : S ) -> Result < ( ) , CapacityError < N > > {
616
613
let string_ref = string. as_ref ( ) ;
617
614
let string_length = string_ref. len ( ) ;
618
615
let old_length = self . vec . length ;
0 commit comments