File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -209,7 +209,7 @@ A basic example is:
209
209
Rust code:
210
210
211
211
~~~~ no_run
212
- extern fn callback(a:i32) {
212
+ extern fn callback(a: i32) {
213
213
println!("I'm called from C with value {0}", a);
214
214
}
215
215
@@ -243,7 +243,7 @@ void trigger_callback() {
243
243
}
244
244
~~~~
245
245
246
- In this example Rust's `main()` will call `do_callback ()` in C,
246
+ In this example Rust's `main()` will call `trigger_callback ()` in C,
247
247
which would, in turn, call back to `callback()` in Rust.
248
248
249
249
@@ -269,7 +269,7 @@ struct RustObject {
269
269
// other members
270
270
}
271
271
272
- extern "C" fn callback(target: *mut RustObject, a:i32) {
272
+ extern "C" fn callback(target: *mut RustObject, a: i32) {
273
273
println!("I'm called from C with value {0}", a);
274
274
unsafe {
275
275
// Update the value in RustObject with the value received from the callback
You can’t perform that action at this time.
0 commit comments