Skip to content

Commit

Permalink
Use ReadableStreamType from web-sys
Browse files Browse the repository at this point in the history
  • Loading branch information
MattiasBuelens committed Sep 27, 2024
1 parent dcc1193 commit 9eee67d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/readable/into_underlying_byte_source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ impl IntoUnderlyingByteSource {
#[wasm_bindgen]
impl IntoUnderlyingByteSource {
#[wasm_bindgen(getter, js_name = type)]
pub fn type_(&self) -> String {
"bytes".into()
pub fn type_(&self) -> sys::ReadableStreamType {

Check warning on line 38 in src/readable/into_underlying_byte_source.rs

View workflow job for this annotation

GitHub Actions / Test

methods `type_`, `auto_allocate_chunk_size`, `start`, `pull`, and `cancel` are never used
sys::ReadableStreamType::Bytes
}

#[wasm_bindgen(getter, js_name = autoAllocateChunkSize)]
Expand Down
1 change: 1 addition & 0 deletions src/readable/sys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ pub use web_sys::ReadableStreamDefaultReader;
pub use web_sys::ReadableStreamGetReaderOptions;
pub use web_sys::ReadableStreamReaderMode;
pub use web_sys::ReadableStreamReadResult;
pub use web_sys::ReadableStreamType;
pub use web_sys::StreamPipeOptions as PipeOptions;

use crate::queuing_strategy::sys::QueuingStrategy;
Expand Down

0 comments on commit 9eee67d

Please sign in to comment.