Correct several minor typos (#3346)

This commit is contained in:
Chris Ohk 2023-03-10 17:00:57 +09:00 committed by GitHub
parent 5d22f5b9d6
commit 0b72e391fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
24 changed files with 29 additions and 31 deletions

View File

@ -419,7 +419,7 @@ Released 2020-03-03.
tightended up a bit.
[#1987](https://github.com/rustwasm/wasm-bindgen/pull/1987)
* The `self` identifier is no longe used on the `no-modules` target, making it a
* The `self` identifier is no longer used on the `no-modules` target, making it a
bit more flexible in more environments.
[#1995](https://github.com/rustwasm/wasm-bindgen/pull/1995)
@ -662,7 +662,7 @@ Released 2019-08-14.
* Add binding for `Element.getElementsByClassName`.
[#1665](https://github.com/rustwasm/wasm-bindgen/pull/1665)
* `PartialEq` and `Eq` are now implementd for all `web-sys` types.
* `PartialEq` and `Eq` are now implemented for all `web-sys` types.
[#1673](https://github.com/rustwasm/wasm-bindgen/pull/1673)
* The `wasm-bindgen-futures` crate now has support for futures when the
@ -793,7 +793,7 @@ Released 2019-06-14.
* Bindings for `Array#flat` and `Array#flatMap` have been added.
[#1573](https://github.com/rustwasm/wasm-bindgen/pull/1573)
* All `#[wasm_bindgen]` types now `AsRef` to themslves.
* All `#[wasm_bindgen]` types now `AsRef` to themselves.
[#1583](https://github.com/rustwasm/wasm-bindgen/pull/1583)
* When using `--target web` the path passed to `init` is no longer required.
@ -1117,7 +1117,7 @@ Released 2019-03-04.
landed and is enabled with `WASM_BINDGEN_ANYREF=1`.
[#1002](https://github.com/rustwasm/wasm-bindgen/pull/1002)
* Support fot the new browser `TextEncode#encodeInto` API has been added.
* Support for the new browser `TextEncode#encodeInto` API has been added.
[#1279](https://github.com/rustwasm/wasm-bindgen/pull/1279)
* JS doc comments are now added to TypeScript bindings in addition to the JS

View File

@ -2551,9 +2551,7 @@ impl<'a> Context<'a> {
match &export.kind {
AuxExportKind::Function(_) => {}
AuxExportKind::Constructor(class) => builder.constructor(class),
AuxExportKind::Method {
receiver: reciever, ..
} => match reciever {
AuxExportKind::Method { receiver, .. } => match receiver {
AuxReceiverKind::None => {}
AuxReceiverKind::Borrowed => builder.method(false),
AuxReceiverKind::Owned => builder.method(true),

View File

@ -11,7 +11,7 @@ fn new_undefined() {
#[allow(deprecated)]
#[wasm_bindgen_test]
fn new_truely() {
fn new_truly() {
assert_eq!(Boolean::new(&JsValue::from("foo")).value_of(), true);
}

View File

@ -16,7 +16,7 @@ macro_rules! each {
};
}
macro_rules! test_inheritence {
macro_rules! test_inheritance {
($arr:ident) => {{
let arr = $arr::new(&JsValue::undefined());
assert!(arr.is_instance_of::<$arr>());
@ -25,8 +25,8 @@ macro_rules! test_inheritence {
}};
}
#[wasm_bindgen_test]
fn inheritence() {
each!(test_inheritence);
fn inheritance() {
each!(test_inheritance);
}
macro_rules! test_undefined {

View File

@ -1,5 +1,5 @@
# wasm-bindgen-test-runner
This is an **experimental** crate for enabling `cargo test --target
wasm32-unknown-unknown`. For more information see the README fo
wasm32-unknown-unknown`. For more information see the README of
`wasm-bindgen-test`.

View File

@ -175,7 +175,7 @@ impl Config {
// from the follower thread, after initialization.
// - The leader does _not_ need to block.
// - Similar restrictions apply: the follower thread should be considered unusable afterwards,
// the leader should not call this function with the same set of parameteres twice.
// the leader should not call this function with the same set of parameters twice.
// - Moreover, concurrent calls can lead to UB: the follower could be in the middle of a
// call while the leader is destroying its stack! You should make sure that this cannot happen.
inject_destroy(module, &tls, &stack, memory)?;

View File

@ -98,7 +98,7 @@ fn element() {
);
/* Tests needed for:
remove_attribute_ns
has_attribure_ns
has_attribute_ns
closest
*/

View File

@ -42,7 +42,7 @@ interface mixin ExceptionMembers
[ChromeOnly, Exposed=Window]
readonly attribute StackFrame? location;
// Arbitary data for the implementation.
// Arbitrary data for the implementation.
[Exposed=Window]
readonly attribute nsISupports? data;

View File

@ -355,7 +355,7 @@ partial interface Document {
[ChromeOnly] readonly attribute boolean userHasInteracted;
};
// Extension to give chrome JS the ability to simulate activate the docuement
// Extension to give chrome JS the ability to simulate activate the document
// by user gesture.
partial interface Document {
[ChromeOnly]

View File

@ -110,7 +110,7 @@ interface Element : Node {
/**
* Set this during a mousedown event to grab and retarget all mouse events
* to this element until the mouse button is released or releaseCapture is
* called. If retargetToElement is true, then all events are targetted at
* called. If retargetToElement is true, then all events are targeted at
* this element. If false, events can also fire at descendants of this
* element.
*

View File

@ -28,7 +28,7 @@ interface ImageBitmapRenderingContext {
// it does not change the canvas's intrinsic width or height.
//
// The ImageBitmap, when displayed, is clipped to the rectangle
// defined by the canvas's instrinsic width and height. Pixels that
// defined by the canvas's intrinsic width and height. Pixels that
// would be covered by the canvas's bitmap which are not covered by
// the supplied ImageBitmap are rendered transparent black. Any CSS
// styles affecting the display of the canvas are applied as usual.

View File

@ -9,7 +9,7 @@
enum PresentationConnectionState
{
// The initial state when a PresentationConnection is ceated.
// The initial state when a PresentationConnection is created.
"connecting",
// Existing presentation, and the communication channel is active.

View File

@ -76,7 +76,7 @@ interface RTCRtpSender {
Promise<RTCStatsReport> getStats();
[Pref="media.peerconnection.dtmf.enabled"]
readonly attribute RTCDTMFSender? dtmf;
// Ugh, can't use a ChromeOnly attibute sequence<MediaStream>...
// Ugh, can't use a ChromeOnly attribute sequence<MediaStream>...
[ChromeOnly]
sequence<MediaStream> getStreams();
[ChromeOnly]

View File

@ -18,7 +18,7 @@ interface ScrollBoxObject : BoxObject {
/**
* Scroll the given amount of device pixels to the right and down.
* Values will be clamped to make the resuling position legal.
* Values will be clamped to make the resulting position legal.
*/
[Throws]
undefined scrollBy(long dx, long dy);

View File

@ -110,7 +110,7 @@ interface TreeView
/**
* The level is an integer value that represents
* the level of indentation. It is multiplied by the width specified in the
* :moz-tree-indentation pseudoelement to compute the exact indendation.
* :moz-tree-indentation pseudoelement to compute the exact indentation.
*/
[Throws]
long getLevel(long row);

View File

@ -54,5 +54,5 @@ fn required() {
#[wasm_bindgen_test]
fn correct_casing_in_js() {
assert_camel_case(PreserveNames::new().wierd_field_name(1));
assert_camel_case(PreserveNames::new().weird_field_name(1));
}

View File

@ -123,7 +123,7 @@ global.assert_dict_required = function (c) {
};
global.assert_camel_case = function (dict) {
strictEqual(dict.wierd_fieldName, 1);
strictEqual(dict.weird_fieldName, 1);
}
global.Shape = class Shape {

View File

@ -47,5 +47,5 @@ dictionary Required {
};
dictionary PreserveNames {
long wierd_fieldName;
long weird_fieldName;
};

View File

@ -615,7 +615,7 @@ impl<'a> IdlType<'a> {
// Note that most union types have already been expanded to
// their components via `flatten`. Unions in a return position
// or dictionary fields, however, haven't been flattened, which
// means we may need to conver them to a `syn` type.
// means we may need to convert them to a `syn` type.
//
// Currently this does a bit of a "poor man's" tree traversal by
// saying that if all union members are interfaces we can assume

View File

@ -16,7 +16,7 @@ self.onmessage = ({ data: bytes }) => {
};
/**
* Once the Web Worker was spwaned we ask the main thread to fetch the bytes
* Once the Web Worker was spawned we ask the main thread to fetch the bytes
* for the WebAssembly module. Once fetched it will send the bytes back via
* a `postMessage` (see above).
*/

View File

@ -116,7 +116,7 @@ The `arg1` and `arg2` values here are actually a pointer and a length to a utf-8
encoded string, and with host bindings we'll be able to annotate that this
import should take those two arguments and convert them to a JS string (that is,
the *host* should do this, the WebAssembly engine). Using that feature we can
futher trim this down to:
further trim this down to:
```js
const __wbg_bar_target = Foo.prototype.bar;

View File

@ -31,4 +31,4 @@ picked up by wasm-bindgen-cli. This would be equivalent to the contents of
the TS_APPEND_CONTENT string in the first example.
This feature allows plain data objects to be typechecked in Rust and in
TypeScript by outputing a type definition generated at compile time.
TypeScript by outputting a type definition generated at compile time.

View File

@ -132,7 +132,7 @@ unsafe impl WasmAbi for i64 {}
unsafe impl WasmAbi for f32 {}
unsafe impl WasmAbi for f64 {}
/// A trait representing how to interepret the return value of a function for
/// A trait representing how to interpret the return value of a function for
/// the wasm ABI.
///
/// This is very similar to the `IntoWasmAbi` trait and in fact has a blanket

View File

@ -43,7 +43,7 @@ impl Slab {
if self.base == 0 {
self.base = r as usize;
} else if self.base + self.data.len() != r as usize {
internal_error("someone else allocated table entires?")
internal_error("someone else allocated table entries?")
}
// poor man's `try_reserve_exact` until that's stable