mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-15 22:28:10 +08:00
Rename the "Table" type to "List" everywhere (#4133)
* Rename the "Table" type to "List" everywhere * Fix a few missed ones * Re-save demo artwork
This commit is contained in:
@@ -1235,7 +1235,7 @@ mod tests {
|
||||
fn test_node_with_implementations() {
|
||||
let attr = quote!(category("Raster: Adjustment"));
|
||||
let input = quote!(
|
||||
fn levels<P: Pixel>(image: Table<Raster<P>>, #[implementations(f32, f64)] shadows: f64) -> Table<Raster<P>> {
|
||||
fn levels<P: Pixel>(image: List<Raster<P>>, #[implementations(f32, f64)] shadows: f64) -> List<Raster<P>> {
|
||||
// Implementation details...
|
||||
}
|
||||
);
|
||||
@@ -1261,11 +1261,11 @@ mod tests {
|
||||
where_clause: None,
|
||||
input: Input {
|
||||
pat_ident: pat_ident("image"),
|
||||
ty: parse_quote!(Table<Raster<P>>),
|
||||
ty: parse_quote!(List<Raster<P>>),
|
||||
implementations: Punctuated::new(),
|
||||
context_features: vec![],
|
||||
},
|
||||
output_type: parse_quote!(Table<Raster<P>>),
|
||||
output_type: parse_quote!(List<Raster<P>>),
|
||||
is_async: false,
|
||||
fields: vec![ParsedField {
|
||||
pat_ident: pat_ident("shadows"),
|
||||
@@ -1377,7 +1377,7 @@ mod tests {
|
||||
fn test_async_node() {
|
||||
let attr = quote!(category("IO"));
|
||||
let input = quote!(
|
||||
async fn load_image(api: &PlatformEditorApi, #[expose] path: String) -> Table<Raster<CPU>> {
|
||||
async fn load_image(api: &PlatformEditorApi, #[expose] path: String) -> List<Raster<CPU>> {
|
||||
// Implementation details...
|
||||
}
|
||||
);
|
||||
@@ -1407,7 +1407,7 @@ mod tests {
|
||||
implementations: Punctuated::new(),
|
||||
context_features: vec![],
|
||||
},
|
||||
output_type: parse_quote!(Table<Raster<CPU>>),
|
||||
output_type: parse_quote!(List<Raster<CPU>>),
|
||||
is_async: true,
|
||||
fields: vec![ParsedField {
|
||||
pat_ident: pat_ident("path"),
|
||||
@@ -1534,7 +1534,7 @@ mod tests {
|
||||
fn test_invalid_implementation_syntax() {
|
||||
let attr = quote!(category("Test"));
|
||||
let input = quote!(
|
||||
fn test_node(_: (), #[implementations((Footprint, Color), (Footprint, Table<Raster<CPU>>))] input: impl Node<Footprint, Output = T>) -> T {
|
||||
fn test_node(_: (), #[implementations((Footprint, Color), (Footprint, List<Raster<CPU>>))] input: impl Node<Footprint, Output = T>) -> T {
|
||||
// Implementation details...
|
||||
}
|
||||
);
|
||||
@@ -1560,12 +1560,12 @@ mod tests {
|
||||
#[implementations((), #tuples, Footprint)]
|
||||
footprint: F,
|
||||
#[implementations(
|
||||
() -> Table<Raster<CPU>>,
|
||||
() -> Table<Color>,
|
||||
() -> Table<GradientStops>,
|
||||
Footprint -> Table<Raster<CPU>>,
|
||||
Footprint -> Table<Color>,
|
||||
Footprint -> Table<GradientStops>,
|
||||
() -> List<Raster<CPU>>,
|
||||
() -> List<Color>,
|
||||
() -> List<GradientStops>,
|
||||
Footprint -> List<Raster<CPU>>,
|
||||
Footprint -> List<Color>,
|
||||
Footprint -> List<GradientStops>,
|
||||
)]
|
||||
image: impl Node<F, Output = T>,
|
||||
) -> T {
|
||||
|
||||
@@ -186,7 +186,7 @@ impl PerPixelAdjustCodegen<'_> {
|
||||
let wgpu_executor = self.crate_ident.wgpu_executor()?;
|
||||
|
||||
// adapt fields for gpu node
|
||||
let raster_gpu: Type = parse_quote!(#gcore::table::Table<#raster_types::Raster<#raster_types::GPU>>);
|
||||
let raster_gpu: Type = parse_quote!(#gcore::list::List<#raster_types::Raster<#raster_types::GPU>>);
|
||||
let mut fields = self
|
||||
.parsed
|
||||
.fields
|
||||
|
||||
Reference in New Issue
Block a user