Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Nazariglez committed Feb 19, 2024
1 parent d5901c0 commit fdda349
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion crates/notan_gfx/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::gfx::Gfx;
use crate::GfxAttributes;
use notan_app2::App;
use notan_core::window::{WindowAction, WindowEvent};
use notan_core::{AppBuilder, BuildConfig, AppState};
use notan_core::{AppBuilder, AppState, BuildConfig};

#[derive(Default)]
pub struct GfxConfig {
Expand Down
4 changes: 3 additions & 1 deletion crates/notan_gfx/src/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ use crate::pipeline::{NotanRenderPipeline, RenderPipelineDescriptor};
use crate::render_target::RenderTarget;
use crate::render_texture::{NotanRenderTexture, RenderTextureDescriptor};
use crate::renderer::Renderer;
use crate::texture::{NotanSampler, NotanTexture, SamplerDescriptor, TextureData, TextureDescriptor};
use crate::texture::{
NotanSampler, NotanTexture, SamplerDescriptor, TextureData, TextureDescriptor,
};
use crate::{BindGroupDescriptor, DrawFrame, NotanBindGroup, NotanBindGroupLayoutRef};
use notan_core::window::{NotanWindow, WindowId};

Expand Down
4 changes: 2 additions & 2 deletions crates/notan_gfx/src/gfx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ use crate::renderer::Renderer;
use crate::{
BindGroup, BindGroupDescriptor, BindGroupEntry, BindGroupLayout, BindGroupLayoutId,
BindGroupLayoutRef, BlendMode, Buffer, BufferDescriptor, BufferUsage, ColorMask, CompareMode,
CullMode, DepthStencil, Device, DrawFrame, NotanBuffer, GfxAttributes, GfxConfig, IndexFormat,
CullMode, DepthStencil, Device, DrawFrame, GfxAttributes, GfxConfig, IndexFormat, NotanBuffer,
Primitive, RenderPipeline, RenderTexture, Sampler, SamplerDescriptor, Stencil, Texture,
TextureData, TextureDescriptor, TextureFilter, TextureFormat, TextureWrap, VertexLayout,
};
use crate::{NotanDevice, RenderPipelineDescriptor};
use image::EncodableLayout;
use notan_core::window::{NotanWindow, WindowId};
use notan_core::Plugin;
use image::EncodableLayout;

pub struct Gfx {
pub(crate) raw: Device,
Expand Down
2 changes: 1 addition & 1 deletion crates/notan_gfx/src/wgpu/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ use crate::{
MAX_BINDING_ENTRIES,
};
use arrayvec::ArrayVec;
use hashbrown::HashMap;
use notan_core::window::{NotanWindow, WindowId};
use notan_core::Plugin;
use hashbrown::HashMap;
use std::borrow::Cow;
use std::cell::RefCell;
use std::sync::Arc;
Expand Down
6 changes: 3 additions & 3 deletions crates/notan_gfx/src/wgpu/surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ impl Surface {
log::trace!("Creating a new Surface for Window {:?}", window.id());
let surface = unsafe {
ctx.instance.create_surface_unsafe(
wgpu::SurfaceTargetUnsafe::from_window(window)
.map_err(|e| e.to_string())?
wgpu::SurfaceTargetUnsafe::from_window(window).map_err(|e| e.to_string())?,
)
}.map_err(|e| e.to_string())?;
}
.map_err(|e| e.to_string())?;

if !ctx.is_surface_compatible(&surface) {
log::trace!(
Expand Down
2 changes: 1 addition & 1 deletion crates/notan_macro2/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use proc_macro::*;

mod state;
mod resource;
mod state;

#[proc_macro_derive(AppState)]
pub fn state_derive(input: TokenStream) -> TokenStream {
Expand Down
Empty file added examples/gfx_triangle.rs
Empty file.

0 comments on commit fdda349

Please sign in to comment.