mirror of
https://github.com/servo/servo
synced 2026-05-13 10:27:03 +02:00
This is a preparation for publishing to crates.io. Changes include: - Add `servo-` prefixes to avoid name collisions on crates.io - Use `-` instead of `_` in package names. - Rename the crates to their original names in Cargo.toml, to keep the diff minimal - Rename `media` to `servo-media-thread` to avoid name collision with `servo-media` (originally from the media repository). This is an outcome of the previous discussion at [#general > Switch remaining git dependencies to crates.io](https://servo.zulipchat.com/#narrow/channel/263398-general/topic/Switch.20remaining.20git.20dependencies.20to.20crates.2Eio/with/576336288) Testing: This should be mostly covered by our CI, but some amount of breakage is to be expected, since some package names could still be referenced from scripts which are not tested or run in CI. [mach try run](https://github.com/jschwe/servo/actions/runs/22502945949) --------- Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
37 lines
1.1 KiB
Rust
37 lines
1.1 KiB
Rust
// Copyright 2023 The Servo Project Developers. See the COPYRIGHT
|
|
// file at the top-level directory of this distribution and at
|
|
// http://rust-lang.org/COPYRIGHT.
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
|
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
|
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
|
// option. This file may not be copied, modified, or distributed
|
|
// except according to those terms.
|
|
|
|
use cookie::Cookie;
|
|
use headers::ContentType;
|
|
use http::header::HeaderMap;
|
|
use hyper::{Method, StatusCode, Uri};
|
|
use mime::Mime;
|
|
use serde::{Deserialize, Serialize};
|
|
use servo_hyper_serde::{De, Ser, Serde};
|
|
|
|
fn is_supported<T>()
|
|
where
|
|
for<'de> De<T>: Deserialize<'de>,
|
|
for<'a> Ser<'a, T>: Serialize,
|
|
for<'de> Serde<T>: Deserialize<'de> + Serialize,
|
|
{
|
|
}
|
|
|
|
#[test]
|
|
fn supported() {
|
|
is_supported::<Cookie>();
|
|
is_supported::<ContentType>();
|
|
is_supported::<HeaderMap>();
|
|
is_supported::<Method>();
|
|
is_supported::<Mime>();
|
|
is_supported::<StatusCode>();
|
|
is_supported::<Uri>();
|
|
}
|