Skip to content

Commit

Permalink
use unused code + fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mrDIMAS committed Jun 16, 2024
1 parent 1ee03a4 commit 3a729ed
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions editor/src/scene/commands/graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ impl CommandTrait for SetGraphNodeChildPosition {
}
}

#[allow(dead_code)]
#[derive(Debug)]
pub struct DeleteNodeCommand {
handle: Handle<Node>,
Expand Down
4 changes: 2 additions & 2 deletions fyrox-impl/src/scene/mesh/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1065,12 +1065,12 @@ impl VertexBuffer {
pub fn attribute_view_mut<T: Copy>(
&mut self,
usage: VertexAttributeUsage,
) -> Option<AttributeViewRef<'_, T>> {
) -> Option<AttributeViewRefMut<'_, T>> {
if let Some(attribute) = self.dense_layout.iter().find(|attribute| {
attribute.usage == usage
&& attribute.size * attribute.data_type.size() == std::mem::size_of::<T>() as u8
}) {
Some(AttributeViewRef {
Some(AttributeViewRefMut {
ptr: unsafe { self.data.bytes.as_mut_ptr().add(attribute.offset as usize) },
stride: self.vertex_size as usize,
count: self.vertex_count as usize,
Expand Down
2 changes: 1 addition & 1 deletion fyrox-scripts/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pub mod camera;
/// Registers every script from the crate in the given constructor container. Use it, if you want to register all
/// available scripts at once. Typical usage could be like this:
///
/// ```rust
/// ```rust,no_run
/// # use fyrox::{
/// # core::pool::Handle, core::visitor::prelude::*, core::reflect::prelude::*,
/// # plugin::{Plugin, PluginContext, PluginRegistrationContext},
Expand Down

0 comments on commit 3a729ed

Please sign in to comment.