Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix wasm-bindgen-maro issue. #248

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@ exclude = [
".github/*"
]
categories = ["web-programming", "encoding", "data-structures"]
resolver = "2"

# Enable all features when building on docs.rs to show feature gated bindings
[package.metadata.docs.rs]
1 change: 1 addition & 0 deletions example-projects/reqwest-wasm-example/Cargo.toml
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@ name = "reqwest-wasm-example"
version = "0.3.0"
authors = ["Francesco Guardiani <[email protected]>"]
edition = "2018"
resolver = "2"

# Config mostly pulled from: https://github.com/rustwasm/wasm-bindgen/blob/master/examples/fetch/Cargo.toml


Unchanged files with check annotations Beta

AttributeValue::Boolean(b) => f.serialize_bool(**b),
AttributeValue::Integer(i) => f.serialize_i64(**i),
AttributeValue::String(s) => f.write_str(s),
AttributeValue::Binary(b) => f.write_str(&base64::encode(b)),

Check warning on line 40 in src/event/attributes.rs

GitHub Actions / Rust

use of deprecated function `base64::encode`: Use Engine::encode

Check warning on line 40 in src/event/attributes.rs

GitHub Actions / nightly / wasm32-unknown-unknown

use of deprecated function `base64::encode`: Use Engine::encode

Check warning on line 40 in src/event/attributes.rs

GitHub Actions / stable / wasm32-unknown-unknown

use of deprecated function `base64::encode`: Use Engine::encode

Check warning on line 40 in src/event/attributes.rs

GitHub Actions / stable / wasm32-unknown-unknown

use of deprecated function `base64::encode`: Use Engine::encode

Check warning on line 40 in src/event/attributes.rs

GitHub Actions / nightly / x86_64-unknown-linux-gnu

use of deprecated function `base64::encode`: Use Engine::encode

Check warning on line 40 in src/event/attributes.rs

GitHub Actions / nightly / x86_64-unknown-linux-gnu

use of deprecated function `base64::encode`: Use Engine::encode

Check warning on line 40 in src/event/attributes.rs

GitHub Actions / nightly / x86_64-unknown-linux-musl

use of deprecated function `base64::encode`: Use Engine::encode

Check warning on line 40 in src/event/attributes.rs

GitHub Actions / nightly / x86_64-unknown-linux-musl

use of deprecated function `base64::encode`: Use Engine::encode

Check warning on line 40 in src/event/attributes.rs

GitHub Actions / stable / x86_64-unknown-linux-musl

use of deprecated function `base64::encode`: Use Engine::encode

Check warning on line 40 in src/event/attributes.rs

GitHub Actions / stable / x86_64-unknown-linux-musl

use of deprecated function `base64::encode`: Use Engine::encode

Check warning on line 40 in src/event/attributes.rs

GitHub Actions / stable / x86_64-unknown-linux-gnu

use of deprecated function `base64::encode`: Use Engine::encode

Check warning on line 40 in src/event/attributes.rs

GitHub Actions / stable / x86_64-unknown-linux-gnu

use of deprecated function `base64::encode`: Use Engine::encode

Check warning on line 40 in src/event/attributes.rs

GitHub Actions / stable / x86_64-unknown-linux-gnu

use of deprecated function `base64::encode`: Use Engine::encode

Check warning on line 40 in src/event/attributes.rs

GitHub Actions / stable / x86_64-unknown-linux-gnu

use of deprecated function `base64::encode`: Use Engine::encode

Check warning on line 40 in src/event/attributes.rs

GitHub Actions / stable / x86_64-unknown-linux-gnu

use of deprecated function `base64::encode`: Use Engine::encode

Check warning on line 40 in src/event/attributes.rs

GitHub Actions / stable / x86_64-unknown-linux-gnu

use of deprecated function `base64::encode`: Use Engine::encode

Check warning on line 40 in src/event/attributes.rs

GitHub Actions / stable / x86_64-unknown-linux-gnu

use of deprecated function `base64::encode`: Use Engine::encode

Check warning on line 40 in src/event/attributes.rs

GitHub Actions / stable / x86_64-unknown-linux-gnu

use of deprecated function `base64::encode`: Use Engine::encode
AttributeValue::URI(s) => f.write_str(s.as_str()),
AttributeValue::URIRef(s) => f.write_str(s.as_str()),
AttributeValue::Time(s) => f.write_str(&s.to_rfc3339()),
//! only the module associated with the Protocol Binding you need:
//!
//! - `actix`: Enables the [`binding::actix`] protocol binding module. This
//! extends the [`actix_web::HttpRequest`] with a

Check warning on line 40 in src/lib.rs

GitHub Actions / Rust

doc list item without indentation
//! [`to_event`](binding::actix::HttpRequestExt::to_event) function, the

Check warning on line 41 in src/lib.rs

GitHub Actions / Rust

doc list item without indentation
//! [`actix_web::HttpResponseBuilder`] with an

Check warning on line 42 in src/lib.rs

GitHub Actions / Rust

doc list item without indentation
//! [`event`](binding::actix::HttpResponseBuilderExt::event) function,

Check warning on line 43 in src/lib.rs

GitHub Actions / Rust

doc list item without indentation
//! and implementations for [`actix_web::FromRequest`] and

Check warning on line 44 in src/lib.rs

GitHub Actions / Rust

doc list item without indentation
//! [`actix_web::Responder`] in order to take advantage of actix-web's

Check warning on line 45 in src/lib.rs

GitHub Actions / Rust

doc list item without indentation
//! [Extractors] and [Responders]

Check warning on line 46 in src/lib.rs

GitHub Actions / Rust

doc list item without indentation
//! - `reqwest`: Enables the [`binding::reqwest`] protocol binding module.
//! - `warp`: Enables the [`binding::warp`] protocol binding module.
//! - `axum`: Enables the [`binding::axum`] protocol binding module.
}
}
pub(crate) static CLOUDEVENTS_JSON_HEADER: &str = "application/cloudevents+json";

Check warning on line 58 in src/binding/mod.rs

GitHub Actions / stable / x86_64-unknown-linux-gnu

static `CLOUDEVENTS_JSON_HEADER` is never used
pub(crate) static CLOUDEVENTS_BATCH_JSON_HEADER: &str = "application/cloudevents-batch+json";

Check warning on line 59 in src/binding/mod.rs

GitHub Actions / stable / x86_64-unknown-linux-gnu

static `CLOUDEVENTS_BATCH_JSON_HEADER` is never used

Check warning on line 59 in src/binding/mod.rs

GitHub Actions / stable / x86_64-unknown-linux-gnu

static `CLOUDEVENTS_BATCH_JSON_HEADER` is never used

Check warning on line 59 in src/binding/mod.rs

GitHub Actions / stable / x86_64-unknown-linux-gnu

static `CLOUDEVENTS_BATCH_JSON_HEADER` is never used

Check warning on line 59 in src/binding/mod.rs

GitHub Actions / stable / x86_64-unknown-linux-gnu

static `CLOUDEVENTS_BATCH_JSON_HEADER` is never used

Check warning on line 59 in src/binding/mod.rs

GitHub Actions / stable / x86_64-unknown-linux-gnu

static `CLOUDEVENTS_BATCH_JSON_HEADER` is never used

Check warning on line 59 in src/binding/mod.rs

GitHub Actions / stable / x86_64-unknown-linux-gnu

static `CLOUDEVENTS_BATCH_JSON_HEADER` is never used
pub(crate) static CONTENT_TYPE: &str = "content-type";

Check warning on line 60 in src/binding/mod.rs

GitHub Actions / stable / x86_64-unknown-linux-gnu

static `CONTENT_TYPE` is never used
fn header_prefix(prefix: &str, name: &str) -> String {

Check warning on line 62 in src/binding/mod.rs

GitHub Actions / stable / x86_64-unknown-linux-gnu

function `header_prefix` is never used
if name == "datacontenttype" {
CONTENT_TYPE.to_string()
} else {