Skip to content

Commit

Permalink
Fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
roblabla committed Sep 23, 2019
1 parent 605f3ea commit 7651488
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
6 changes: 6 additions & 0 deletions ipcdefs/loader.id
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# A mishmash of Nintendo's loader and pm in a single disgusting service.
#
# Responsible for creating, loading, starting and waiting on processes.
interface sunrise_libuser::ldr::ILoaderInterface is ldr:shel {
# Create, load and start the process `title_name` with the given args.
# Returns the process' pid.
[0] launch_title(array<u8, 9> title_name, array<u8, 9> args) -> u64 pid;
# Wait for the process with the given pid, returning the exit status.
[1] wait(u64 pid) -> u32 exit_status;
}
4 changes: 2 additions & 2 deletions kernel/src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ impl ReadableEvent {
/// - The event wasn't signaled.
pub fn clear_signal(&self) -> Result<(), KernelError> {
let oldstate = self.parent.state.swap(false, Ordering::SeqCst);
if oldstate == false {
if !oldstate {
return Err(KernelError::InvalidState { backtrace: Backtrace::new() })
}
Ok(())
Expand Down Expand Up @@ -210,7 +210,7 @@ impl WritableEvent {
/// - The event wasn't signaled.
pub fn clear_signal(&self) -> Result<(), KernelError> {
let oldstate = self.parent.state.swap(false, Ordering::SeqCst);
if oldstate == false {
if !oldstate {
return Err(KernelError::InvalidState { backtrace: Backtrace::new() })
}
Ok(())
Expand Down
5 changes: 2 additions & 3 deletions kernel/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,9 @@ pub use crate::heap_allocator::rust_oom;
static ALLOCATOR: heap_allocator::Allocator = heap_allocator::Allocator::new();

use crate::i386::stack;
use crate::paging::{PAGE_SIZE, MappingAccessRights};
use crate::paging::PAGE_SIZE;
use crate::mem::VirtualAddress;
use crate::process::{ProcessStruct, ThreadStruct};
use sunrise_libkern::MemoryType;
use crate::process::ProcessStruct;
use crate::cpu_locals::init_cpu_locals;
use sunrise_libkern::process::*;

Expand Down
1 change: 1 addition & 0 deletions loader/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ lazy_static! {
};
}

/// Struct implementing the ldr:shel service.
#[derive(Debug, Default)]
struct LoaderIface;

Expand Down

0 comments on commit 7651488

Please sign in to comment.