Skip to content

Commit abe3baf

Browse files
authored
Merge pull request #802 from andyleiserson/block2
block2: Fix typos and other minor issues in comments
2 parents c352e6a + de1249d commit abe3baf

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

crates/block2/src/encoding.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ use objc2::encode::{EncodeArguments, EncodeReturn, Encoding};
1212
/// still serve as a good way to obtain what to fill in the encoding string
1313
/// when implementing [`crate::ManualBlockEncoding`].
1414
///
15+
/// See
16+
/// [`crate::ManualBlockEncoding`](crate::ManualBlockEncoding#encoding-string-generation)
17+
/// for an overview of the encoding string construction.
18+
///
1519
/// # Example
1620
///
1721
/// ```ignore

crates/block2/src/global.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ impl<F: ?Sized> fmt::Debug for GlobalBlock<F> {
132132
/// assert_eq!(ADDER_BLOCK.call((5, 7)), 12);
133133
/// ```
134134
///
135-
/// The following does not compile because [`Box`] is not [`EncodeReturn`]:
135+
/// The following does not compile because [`Box`] is not [`EncodeArgument`]:
136136
///
137137
/// ```compile_fail,E0277
138138
/// use block2::global_block;

crates/block2/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@
218218
//! }
219219
//! ```
220220
//!
221-
//! This can similarly be done for Objcective-C methods declared with
221+
//! This can similarly be done for Objective-C methods declared with
222222
//! [`objc2::extern_methods!`] (though most of the time, the [framework
223223
//! crates][framework-crates] will take care of that for you).
224224
//!

crates/block2/src/stack.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ impl<'f, A, R, Closure> StackBlock<'f, A, R, Closure> {
351351
} else {
352352
BlockFlags::EMPTY
353353
};
354-
// See discussion in `new` above with regards to the safety of the
354+
// See discussion in `maybe_encoded` above with regards to the safety of the
355355
// pointer to the descriptor.
356356
let descriptor = match (mem::needs_drop::<Self>(), E::IS_NONE) {
357357
(true, true) => {

0 commit comments

Comments
 (0)