mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Make contentType optional in source actor source responses
This is allowed by the protocol docs, and eliminates an unwrap(). Co-authored-by: atbrakhi <atbrakhi@igalia.com> Signed-off-by: Delan Azabani <dazabani@igalia.com>
This commit is contained in:
parent
cc5a4d9436
commit
b1503fe832
2 changed files with 5 additions and 5 deletions
|
@ -52,14 +52,14 @@ pub struct SourceActor {
|
|||
pub is_black_boxed: bool,
|
||||
|
||||
pub content: Option<String>,
|
||||
pub content_type: String,
|
||||
pub content_type: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
struct SourceContentReply {
|
||||
from: String,
|
||||
#[serde(rename = "contentType")]
|
||||
content_type: String,
|
||||
content_type: Option<String>,
|
||||
source: String,
|
||||
}
|
||||
|
||||
|
@ -90,7 +90,7 @@ impl SourceActor {
|
|||
name: String,
|
||||
url: ServoUrl,
|
||||
content: Option<String>,
|
||||
content_type: String,
|
||||
content_type: Option<String>,
|
||||
) -> SourceActor {
|
||||
SourceActor {
|
||||
name,
|
||||
|
@ -106,7 +106,7 @@ impl SourceActor {
|
|||
pipeline_id: PipelineId,
|
||||
url: ServoUrl,
|
||||
content: Option<String>,
|
||||
content_type: String,
|
||||
content_type: Option<String>,
|
||||
) -> &SourceActor {
|
||||
let source_actor_name = actors.new_name("source");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue