mirror of
https://github.com/openharmony/third_party_rust_libloading.git
synced 2026-07-21 00:26:36 -04:00
Change Symbol doc test to no_run
This commit is contained in:
+3
-6
@@ -108,18 +108,15 @@ impl fmt::Debug for Library {
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// # #[cfg(all(unix, not(any(target_os="macos", target_os="ios", target_os="android"))))]
|
||||
/// # fn main() {
|
||||
/// # use ::libloading::{ Library, Symbol };
|
||||
/// # let lib = Library::new("libm.so.6").unwrap();
|
||||
/// ```no_run
|
||||
/// # use ::libloading::{ Library, Symbol };
|
||||
/// # let lib = Library::new("libm.so.6").unwrap();
|
||||
/// let sin: Symbol<unsafe extern fn(f64) -> f64> = unsafe {
|
||||
/// lib.get(b"sin\0").unwrap()
|
||||
/// };
|
||||
///
|
||||
/// let sine0 = unsafe { sin(0f64) };
|
||||
/// assert!(sine0 < 0.1E-10);
|
||||
/// # }
|
||||
/// ```
|
||||
pub struct Symbol<'lib, T: 'lib> {
|
||||
inner: imp::Symbol<T>,
|
||||
|
||||
Reference in New Issue
Block a user