Unverified 提交 c5eb1b40 authored 作者: Iñaki Baz Castillo's avatar Iñaki Baz Castillo 提交者: GitHub

Fix Rust docs build (#1271)

上级 f9c081c4
...@@ -46,3 +46,10 @@ jobs: ...@@ -46,3 +46,10 @@ jobs:
- name: cargo test - name: cargo test
run: cargo test --verbose run: cargo test --verbose
- name: cargo doc
run: cargo doc --locked --all --no-deps --lib
env:
DOCS_RS: '1'
RUSTDOCFLAGS: '-D rustdoc::broken-intra-doc-links -D rustdoc::private_intra_doc_links'
...@@ -1028,13 +1028,12 @@ checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" ...@@ -1028,13 +1028,12 @@ checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0"
[[package]] [[package]]
name = "h264-profile-level-id" name = "h264-profile-level-id"
version = "0.1.1" version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e12ebc03fc4f14b7ddc94da90cfb28ba3edee2d926798a9eef89f8a27bbdbca5" checksum = "45d0dbf6a9847b64c9b06938660891f983434dcc009b5ae6a58f5e34af74a649"
dependencies = [ dependencies = [
"bitpattern", "bitpattern",
"log", "log",
"once_cell",
"thiserror", "thiserror",
] ]
......
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
# NEXT # NEXT
* Update h264-profile-level-id dependency to 0.2.0. * Update h264-profile-level-id dependency to 0.2.0.
* Fix docs build (PR #1271).
* Rename `data_consumer::on_producer_resume` to `data_consumer::on_data_producer_resume` (PR #1271).
# 0.13.0 # 0.13.0
......
...@@ -45,7 +45,7 @@ impl AppData { ...@@ -45,7 +45,7 @@ impl AppData {
} }
} }
/// Listening protocol, IP and port for [`WebRtcServer`] to listen on. /// Listening protocol, IP and port for [`WebRtcServer`](crate::webrtc_server::WebRtcServer) to listen on.
/// ///
/// # Notes on usage /// # Notes on usage
/// If you use "0.0.0.0" or "::" as ip value, then you need to also provide `announced_ip`. /// If you use "0.0.0.0" or "::" as ip value, then you need to also provide `announced_ip`.
......
...@@ -903,7 +903,10 @@ impl DataConsumer { ...@@ -903,7 +903,10 @@ impl DataConsumer {
} }
/// Callback is called when the associated data producer is resumed. /// Callback is called when the associated data producer is resumed.
pub fn on_producer_resume<F: Fn() + Send + Sync + 'static>(&self, callback: F) -> HandlerId { pub fn on_data_producer_resume<F: Fn() + Send + Sync + 'static>(
&self,
callback: F,
) -> HandlerId {
self.inner() self.inner()
.handlers .handlers
.data_producer_resume .data_producer_resume
......
...@@ -2,11 +2,6 @@ use std::process::Command; ...@@ -2,11 +2,6 @@ use std::process::Command;
use std::{env, fs}; use std::{env, fs};
fn main() { fn main() {
if env::var("DOCS_RS").is_ok() {
// Skip everything when building docs on docs.rs
return;
}
// On Windows Rust always links against release version of MSVC runtime, thus requires // On Windows Rust always links against release version of MSVC runtime, thus requires
// Release build here // Release build here
let build_type = if cfg!(all(debug_assertions, not(windows))) { let build_type = if cfg!(all(debug_assertions, not(windows))) {
...@@ -45,6 +40,11 @@ fn main() { ...@@ -45,6 +40,11 @@ fn main() {
) )
.expect("Failed to write generated Rust flatbuffers into fbs.rs"); .expect("Failed to write generated Rust flatbuffers into fbs.rs");
if env::var("DOCS_RS").is_ok() {
// Skip everything when building docs on docs.rs
return;
}
// Force forward slashes on Windows too so that is plays well with our tasks.py // Force forward slashes on Windows too so that is plays well with our tasks.py
let mediasoup_out_dir = format!("{}/out", out_dir.replace('\\', "/")); let mediasoup_out_dir = format!("{}/out", out_dir.replace('\\', "/"));
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论