mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 14:27:49 +00:00
Compare commits
4 Commits
1519a17803
...
afeed7477b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
afeed7477b | ||
|
|
611698ec5f | ||
|
|
c34db52262 | ||
|
|
71870a05b0 |
@@ -432,7 +432,7 @@ pub extern "C" fn _start() -> ! {
|
||||
}
|
||||
```
|
||||
|
||||
Remember, this `_start` function is used when running `cargo test --lib`, since Rust's tests the `lib.rs` completely independent of the `main.rs`. We need to call `init` here to set up an IDT before running the tests.
|
||||
Remember, this `_start` function is used when running `cargo test --lib`, since Rust tests the `lib.rs` completely independently of the `main.rs`. We need to call `init` here to set up an IDT before running the tests.
|
||||
|
||||
Now we can create a `test_breakpoint_exception` test:
|
||||
|
||||
|
||||
@@ -425,7 +425,7 @@ ExampleStateMachine::WaitingOnFooTxt(state) => {
|
||||
};
|
||||
*self = ExampleStateMachine::WaitingOnBarTxt(state);
|
||||
} else {
|
||||
*self = ExampleStateMachine::End(EndState));
|
||||
*self = ExampleStateMachine::End(EndState);
|
||||
return Poll::Ready(content);
|
||||
}
|
||||
}
|
||||
@@ -446,7 +446,7 @@ ExampleStateMachine::WaitingOnBarTxt(state) => {
|
||||
match state.bar_txt_future.poll(cx) {
|
||||
Poll::Pending => return Poll::Pending,
|
||||
Poll::Ready(bar_txt) => {
|
||||
*self = ExampleStateMachine::End(EndState));
|
||||
*self = ExampleStateMachine::End(EndState);
|
||||
// from body of `example`
|
||||
return Poll::Ready(state.content + &bar_txt);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user