Skip to content

Commit 4f154d8

Browse files
BernardXiongRbb666
authored andcommitted
[rust] Tidy core defaults and migrate docs to README
1 parent 3c459ae commit 4f154d8

File tree

16 files changed

+8
-8
lines changed

16 files changed

+8
-8
lines changed
File renamed without changes.

components/rust/core/src/api/libloading.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ impl Library {
150150
let h = self.handle;
151151
forget(self);
152152
let rc = libc::dlclose(h);
153-
if rc == 1 {
153+
if rc == 0 {
154154
Ok(())
155155
} else {
156156
Err(DlError::Close(rc))

components/rust/core/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ pub enum RTTError {
7777
FileSetLengthErr,
7878
FileSyncErr,
7979

80-
FuncUnDefine,
80+
FuncUndefined,
8181
}
8282

8383
pub type RTResult<T> = Result<T, RTTError>;

components/rust/core/src/panic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ fn panic(info: &core::panic::PanicInfo) -> ! {
2424
}
2525

2626
#[linkage = "weak"]
27-
#[unsafe(no_mangle)]
27+
#[no_mangle]
2828
fn __rust_panic() -> ! {
2929
/* Default weak panic handler: loops forever to halt execution. */
3030
print!("Entered weak panic handler: system will halt.");

components/rust/core/src/thread.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ impl Thread {
2828

2929
pub fn new() -> ThreadBuilder {
3030
ThreadBuilder {
31-
th_name: "uname".into(),
31+
th_name: "Unnamed".into(),
3232
th_stack_size: 4096,
3333
th_priority: 10,
3434
th_ticks: 10,
@@ -151,4 +151,4 @@ impl ThreadBuilder {
151151
func,
152152
)
153153
}
154-
}
154+
}
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)