mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
script: Limit public exports. (#34915)
* script: Restrict reexport visibility of DOM types. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Mass pub->pub(crate) conversion. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Hide existing dead code warnings. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Formatting. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Fix clippy warnings. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Formatting. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Fix unit tests. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Fix clippy. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * More formatting. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
parent
f220d6d3a5
commit
c94d909a86
585 changed files with 5411 additions and 5013 deletions
|
@ -16,13 +16,13 @@ use crate::dom::types::{GPUInternalError, GPUOutOfMemoryError, GPUValidationErro
|
|||
use crate::script_runtime::CanGc;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct GPUError {
|
||||
pub(crate) struct GPUError {
|
||||
reflector_: Reflector,
|
||||
message: DOMString,
|
||||
}
|
||||
|
||||
impl GPUError {
|
||||
pub fn new_inherited(message: DOMString) -> Self {
|
||||
pub(crate) fn new_inherited(message: DOMString) -> Self {
|
||||
Self {
|
||||
reflector_: Reflector::new(),
|
||||
message,
|
||||
|
@ -30,12 +30,12 @@ impl GPUError {
|
|||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn new(global: &GlobalScope, message: DOMString, can_gc: CanGc) -> DomRoot<Self> {
|
||||
pub(crate) fn new(global: &GlobalScope, message: DOMString, can_gc: CanGc) -> DomRoot<Self> {
|
||||
Self::new_with_proto(global, None, message, can_gc)
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn new_with_proto(
|
||||
pub(crate) fn new_with_proto(
|
||||
global: &GlobalScope,
|
||||
proto: Option<HandleObject>,
|
||||
message: DOMString,
|
||||
|
@ -49,7 +49,7 @@ impl GPUError {
|
|||
)
|
||||
}
|
||||
|
||||
pub fn from_error(global: &GlobalScope, error: Error, can_gc: CanGc) -> DomRoot<Self> {
|
||||
pub(crate) fn from_error(global: &GlobalScope, error: Error, can_gc: CanGc) -> DomRoot<Self> {
|
||||
match error {
|
||||
Error::Validation(msg) => DomRoot::upcast(GPUValidationError::new_with_proto(
|
||||
global,
|
||||
|
@ -91,7 +91,7 @@ impl Convert<GPUErrorFilter> for ErrorFilter {
|
|||
}
|
||||
|
||||
impl GPUErrorFilter {
|
||||
pub fn as_webgpu(&self) -> ErrorFilter {
|
||||
pub(crate) fn as_webgpu(&self) -> ErrorFilter {
|
||||
match self {
|
||||
GPUErrorFilter::Validation => ErrorFilter::Validation,
|
||||
GPUErrorFilter::Out_of_memory => ErrorFilter::OutOfMemory,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue