Skip to content

Commit

Permalink
presubmit
Browse files Browse the repository at this point in the history
  • Loading branch information
bridiver committed Feb 28, 2025
1 parent 997c69d commit b96a1d3
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 10 deletions.
9 changes: 3 additions & 6 deletions third_party/rust/url/v2/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,17 @@ static_library("parser") {
]

deps = [
"//url",
":lib_internal",
"//url",
]
}

cargo_crate("lib_internal") {
crate_name = "url"
epoch = "2"
crate_type = "rlib"
crate_root =
"crate/src/lib.rs"
sources = [
"crate/src/lib.rs"
]
crate_root = "crate/src/lib.rs"
sources = [ "crate/src/lib.rs" ]
inputs = []

cxx_bindings = [ "crate/src/lib.rs" ]
Expand Down
2 changes: 1 addition & 1 deletion third_party/rust/url/v2/crate/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ edition = "2018"
rust-version = "1.51"
name = "url"
version = "2.3.1"
authors = ["The rust-url developers"]
authors = ["The rust-url developers", "Brave developers"]
include = [
"src/**/*",
"LICENSE-*",
Expand Down
3 changes: 3 additions & 0 deletions third_party/rust/url/v2/crate/DEPS
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include_rules = [
"+third_party/rust/cxx/v1/cxx.h"
]
5 changes: 5 additions & 0 deletions third_party/rust/url/v2/crate/parse.cc
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/* Copyright (c) 2025 The Brave Authors. All rights reserved.
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at https://mozilla.org/MPL/2.0/. */

#include "brave/third_party/rust/url/v2/crate/parse.h"

#include <string>
Expand Down
12 changes: 9 additions & 3 deletions third_party/rust/url/v2/crate/parse.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
#pragma once
/* Copyright (c) 2025 The Brave Authors. All rights reserved.
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at https://mozilla.org/MPL/2.0/. */

#ifndef THIRD_PARTY_RUST_URL_V2_CRATE_PARSE_H_
#define THIRD_PARTY_RUST_URL_V2_CRATE_PARSE_H_

#include "third_party/rust/cxx/v1/cxx.h"

namespace cxx_url {

struct ParseResult;

ParseResult ParseURL(rust::Str host);
ParseResult Resolve(const ParseResult& base, rust::Str relative);
} // namespace url

#endif // THIRD_PARTY_RUST_URL_V2_CRATE_PARSE_H_
13 changes: 13 additions & 0 deletions third_party/rust/url/v2/crate/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
// Copyright 2013-2015 The rust-url developers.
//
// 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.

// Copyright (c) 2025 The Brave Authors. All rights reserved.
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at https://mozilla.org/MPL/2.0/.

use std::cmp;
use std::fmt::{self, Write};
use std::hash;
Expand Down

0 comments on commit b96a1d3

Please sign in to comment.