Update readme

This commit is contained in:
Maik Klein 2017-04-30 15:46:38 +02:00
parent 9807a782f4
commit 67773bd2a0

View file

@ -25,10 +25,11 @@ I don't expect any big changes anymore. The library will still remain < 1.0 unti
### Explicit returns with `Result`
Functions return a `type VkResult<T> = Result<T, vk::Result>` instead of an error code. No mutable references for the output are required.
```Rust
// function signature
pub fn create_instance(&self,
create_info: &vk::InstanceCreateInfo,
allocation_callbacks: Option<&vk::AllocationCallbacks>)
-> Result<Instance, InstanceError> {
-> Result<Instance, InstanceError> { .. }
let instance = entry.create_instance(&create_info, None)
.expect("Instance creation error");
```