This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| struct TrieNode { | |
| sib: Option<(char, usize)>, | |
| child: Option<(char, usize)>, | |
| terminal: bool, | |
| } | |
| pub struct Trie { nodes: Vec<TrieNode> } | |
| impl Trie { | |
| fn root(&self) -> &TrieNode { &self.nodes[0] } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fn to_chunks<I: Iterator, const N: usize>(mut iter: I) -> impl Iterator<Item=[I::Item; N]> + { | |
| std::iter::from_fn(move || { | |
| let mut buf: [MaybeUninit<I::Item>; N] = unsafe { MaybeUninit::uninit().assume_init() }; | |
| for i in 0..N { | |
| match iter.next() { | |
| Some(val) => buf[i].write(val), | |
| None => return None | |
| }; | |
| } | |
| Some(unsafe { (&buf as *const _ as *const [I::Item; N]).read() }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [StructLayout(LayoutKind.Sequential)] | |
| public struct LUID | |
| { | |
| public int LowPart; | |
| public int HighPart; | |
| } | |
| [StructLayout(LayoutKind.Sequential)] | |
| public struct LUID_AND_ATTRIBUTES | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| error[E0560]: struct `wgpu_core::command::transfer::BufferCopyView` has no field named `offset` | |
| --> src\backend\direct.rs:172:9 | |
| | | |
| 172 | offset: view.offset, | |
| | ^^^^^^ `wgpu_core::command::transfer::BufferCopyView` does not have this field | |
| | | |
| = note: available fields are: `buffer`, `layout` | |
| error[E0560]: struct `wgpu_core::command::transfer::BufferCopyView` has no field named `bytes_per_row` | |
| --> src\backend\direct.rs:173:9 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Updating git repository `https://github.com/gfx-rs/wgpu` | |
| Checking wgpu v0.5.0 (C:\Users\****\Projects\Rust\wgpu-rs) | |
| error[E0432]: unresolved import `wgt::TextureDataLayout` | |
| --> src\lib.rs:26:80 | |
| | | |
| 26 | SwapChainDescriptor, SwapChainStatus, TextureAspect, TextureComponentType, TextureDataLayout, | |
| | ^^^^^^^^^^^^^^^^^ no `TextureDataLayout` in the root | |
| error[E0412]: cannot find type `TextureDataLayout` in crate `wgt` | |
| --> src\backend\direct.rs:885:27 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use std::ops::{Deref, DerefMut}; | |
| use std::sync::atomic::{AtomicUsize, Ordering}; | |
| const EMPTY: usize = 0; | |
| const FULL: usize = 1; | |
| const IN_USE: usize = 2; | |
| pub struct ResourceCell<T: Send> { | |
| status: AtomicUsize, | |
| resource: UnsafeCell<Option<T>>, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use futures::prelude::*; | |
| use futures::task::{Context, Waker}; | |
| use futures::channel::mpsc; | |
| use std::ops::{Deref, DerefMut}; | |
| use std::sync::{Mutex, MutexGuard, PoisonError, TryLockError}; | |
| pub struct AsyncMutex<T> { | |
| inner: Mutex<(T, mpsc::UnboundedReceiver<Waker>)>, | |
| send: mpsc::UnboundedSender<Waker>, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class SomethingGeneric<T> : SomethingNonGeneric | |
| { | |
| public void DoSomething(T parameter); | |
| } | |
| public interface SomethingNonGeneric { } | |
| public class SomethingStorage | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private void addFaviconToStatusResponse(ServerStatusResponse response) | |
| { | |
| File var2 = this.getFile("server-icon.png"); | |
| if (var2.isFile()) | |
| { | |
| ByteBuf var3 = Unpooled.buffer(); | |
| try | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package net.minecraft.world.chunk; | |
| import cpw.mods.fml.relauncher.Side; | |
| import cpw.mods.fml.relauncher.SideOnly; | |
| import java.util.ArrayList; | |
| import java.util.Arrays; | |
| import java.util.HashMap; | |
| import java.util.Iterator; | |
| import java.util.List; | |
| import java.util.Map; |
NewerOlder