Skip to content

Commit d91703f

Browse files
committed
fix: Error in README.md example
1 parent 29124a8 commit d91703f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ impl Counter {
3232

3333
/// Ownership will NOT control the heap-allocated memory until own it back.
3434
#[no_mangle]
35-
pub extern fn counter_new(value: u8) -> *mut TestIt {
35+
pub extern fn counter_new(value: u8) -> *mut Counter {
3636
return opaque_pointer::raw(Counter::new());
3737
}
3838

@@ -43,7 +43,7 @@ pub extern fn counter_free(counter: *mut Counter) {
4343
}
4444

4545
#[no_mangle]
46-
pub extern fn counter_add(counter: *mut Counter, value: u8) -> boolean {
46+
pub extern fn counter_add(counter: *mut Counter, value: u8) -> bool {
4747
let counter = unsafe { opaque_pointer::mut_object(counter) };
4848
if counter.is_err() {
4949
return false;

0 commit comments

Comments
 (0)