@@ -7,7 +7,7 @@ use num_traits::FromPrimitive;
77
88use crate :: error:: { Error , Result } ;
99use crate :: function:: Function ;
10- use crate :: string:: { BorrowedStr , LuaString } ;
10+ use crate :: string:: LuaString ;
1111use crate :: table:: Table ;
1212use crate :: thread:: Thread ;
1313use crate :: types:: { Integer , LightUserData , Number , ValueRef } ;
@@ -347,31 +347,6 @@ impl Value {
347347 }
348348 }
349349
350- /// Cast the value to [`BorrowedStr`].
351- ///
352- /// If the value is a [`LuaString`], try to convert it to [`BorrowedStr`] or return `None`
353- /// otherwise.
354- #[ deprecated(
355- since = "0.11.0" ,
356- note = "This method does not follow Rust naming convention. Use `as_string().and_then(|s| s.to_str().ok())` instead."
357- ) ]
358- #[ inline]
359- pub fn as_str ( & self ) -> Option < BorrowedStr > {
360- self . as_string ( ) . and_then ( |s| s. to_str ( ) . ok ( ) )
361- }
362-
363- /// Cast the value to [`String`].
364- ///
365- /// If the value is a [`LuaString`], converts it to [`String`] or returns `None` otherwise.
366- #[ deprecated(
367- since = "0.11.0" ,
368- note = "This method does not follow Rust naming convention. Use `as_string().map(|s| s.to_string_lossy())` instead."
369- ) ]
370- #[ inline]
371- pub fn as_string_lossy ( & self ) -> Option < String > {
372- self . as_string ( ) . map ( |s| s. to_string_lossy ( ) )
373- }
374-
375350 /// Returns `true` if the value is a Lua [`Table`].
376351 #[ inline]
377352 pub fn is_table ( & self ) -> bool {
0 commit comments