summaryrefslogtreecommitdiff
path: root/components/rust/core/src
diff options
context:
space:
mode:
Diffstat (limited to 'components/rust/core/src')
-rw-r--r--components/rust/core/src/api/libloading.rs2
-rw-r--r--components/rust/core/src/lib.rs2
-rw-r--r--components/rust/core/src/panic.rs2
-rw-r--r--components/rust/core/src/thread.rs4
4 files changed, 5 insertions, 5 deletions
diff --git a/components/rust/core/src/api/libloading.rs b/components/rust/core/src/api/libloading.rs
index 438f1fb40b..90b33cc92d 100644
--- a/components/rust/core/src/api/libloading.rs
+++ b/components/rust/core/src/api/libloading.rs
@@ -150,7 +150,7 @@ impl Library {
let h = self.handle;
forget(self);
let rc = libc::dlclose(h);
- if rc == 1 {
+ if rc == 0 {
Ok(())
} else {
Err(DlError::Close(rc))
diff --git a/components/rust/core/src/lib.rs b/components/rust/core/src/lib.rs
index 2787b7240a..01e4b34102 100644
--- a/components/rust/core/src/lib.rs
+++ b/components/rust/core/src/lib.rs
@@ -77,7 +77,7 @@ pub enum RTTError {
FileSetLengthErr,
FileSyncErr,
- FuncUnDefine,
+ FuncUndefined,
}
pub type RTResult<T> = Result<T, RTTError>;
diff --git a/components/rust/core/src/panic.rs b/components/rust/core/src/panic.rs
index 371f86fdb6..b45ad7d1a3 100644
--- a/components/rust/core/src/panic.rs
+++ b/components/rust/core/src/panic.rs
@@ -24,7 +24,7 @@ fn panic(info: &core::panic::PanicInfo) -> ! {
}
#[linkage = "weak"]
-#[unsafe(no_mangle)]
+#[no_mangle]
fn __rust_panic() -> ! {
/* Default weak panic handler: loops forever to halt execution. */
print!("Entered weak panic handler: system will halt.");
diff --git a/components/rust/core/src/thread.rs b/components/rust/core/src/thread.rs
index 35e03f3c3a..791fd46da7 100644
--- a/components/rust/core/src/thread.rs
+++ b/components/rust/core/src/thread.rs
@@ -28,7 +28,7 @@ impl Thread {
pub fn new() -> ThreadBuilder {
ThreadBuilder {
- th_name: "uname".into(),
+ th_name: "Unnamed".into(),
th_stack_size: 4096,
th_priority: 10,
th_ticks: 10,
@@ -151,4 +151,4 @@ impl ThreadBuilder {
func,
)
}
-} \ No newline at end of file
+}