Skip to content

Commit

Permalink
iox-#23 Fix iceoryx spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
elBoberido committed Jun 27, 2022
1 parent 3e35a0e commit abe93b3
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use thiserror::Error;

#[derive(Error, Debug)]
pub enum IceOryxError {
pub enum IceoryxError {
#[error("could not alloce a chunk")]
ChunkAllocationFailed,
#[error("could not create a publisher")]
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub mod pb;
pub mod sb;

// re-export structs
pub use error::IceOryxError;
pub use error::IceoryxError;
pub use runtime::Runtime;

#[cfg(test)]
Expand Down
6 changes: 3 additions & 3 deletions src/pb/ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// SPDX-FileContributor: Mathias Kraus

use crate::pb::PublisherOptions;
use crate::IceOryxError;
use crate::IceoryxError;

use std::ffi::CString;

Expand Down Expand Up @@ -101,7 +101,7 @@ impl Publisher {
}
}

pub fn allocate_chunk<T>(&self) -> Result<Box<T>, IceOryxError> {
pub fn allocate_chunk<T>(&self) -> Result<Box<T>, IceoryxError> {
let payload_size = std::mem::size_of::<T>() as u32;
unsafe {
let chunk = cpp!([self as "PublisherPortUser*", payload_size as "uint32_t"] -> *mut std::ffi::c_void as "void*" {
Expand All @@ -119,7 +119,7 @@ impl Publisher {
if !chunk.is_null() {
Ok(Box::from_raw(chunk as *mut T))
} else {
Err(IceOryxError::ChunkAllocationFailed)
Err(IceoryxError::ChunkAllocationFailed)
}
}
}
Expand Down
12 changes: 6 additions & 6 deletions src/pb/publisher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// SPDX-FileContributor: Mathias Kraus

use super::{ffi::Publisher as FfiPublisher, sample::SampleMut, PublisherOptions, POD};
use crate::IceOryxError;
use crate::IceoryxError;

use std::marker::PhantomData;

Expand Down Expand Up @@ -36,21 +36,21 @@ impl<'a, T: POD> PublisherBuilder<'a, T> {
self
}

pub fn create(mut self) -> Result<Publisher<T>, IceOryxError> {
pub fn create(mut self) -> Result<Publisher<T>, IceoryxError> {
self.options.offer_on_create = true;
let ffi_pub = FfiPublisher::new(self.service, self.instance, self.event, &self.options)
.ok_or(IceOryxError::PublisherCreationFailed)?;
.ok_or(IceoryxError::PublisherCreationFailed)?;

Ok(Publisher {
ffi_pub,
phantom: PhantomData,
})
}

pub fn create_without_offer(mut self) -> Result<InactivePublisher<T>, IceOryxError> {
pub fn create_without_offer(mut self) -> Result<InactivePublisher<T>, IceoryxError> {
self.options.offer_on_create = false;
let ffi_pub = FfiPublisher::new(self.service, self.instance, self.event, &self.options)
.ok_or(IceOryxError::PublisherCreationFailed)?;
.ok_or(IceoryxError::PublisherCreationFailed)?;

Ok(InactivePublisher {
ffi_pub,
Expand Down Expand Up @@ -104,7 +104,7 @@ impl<T: POD> Publisher<T> {
self.ffi_pub.has_subscribers()
}

pub fn allocate_sample(&self) -> Result<SampleMut<T>, IceOryxError> {
pub fn allocate_sample(&self) -> Result<SampleMut<T>, IceoryxError> {
Ok(SampleMut {
data: Some(self.ffi_pub.allocate_chunk()?),
service: self,
Expand Down
14 changes: 7 additions & 7 deletions src/sb/subscriber.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use super::{
ffi, ffi::SubscriberStrongRef, sample::SampleReceiver, SubscribeState, SubscriberOptions,
};
use super::{mt, st};
use crate::IceOryxError;
use crate::IceoryxError;

use std::marker::PhantomData;

Expand Down Expand Up @@ -44,10 +44,10 @@ impl<'a, T> SubscriberBuilder<'a, T> {
self
}

pub fn create(mut self) -> Result<(st::Subscriber<T>, SampleReceiverToken), IceOryxError> {
pub fn create(mut self) -> Result<(st::Subscriber<T>, SampleReceiverToken), IceoryxError> {
self.options.subscribe_on_create = true;
let ffi_sub = ffi::Subscriber::new(self.service, self.instance, self.event, &self.options)
.ok_or(IceOryxError::SubscriberCreationFailed)?;
.ok_or(IceoryxError::SubscriberCreationFailed)?;

let subscriber = st::Subscriber {
ffi_sub: ffi::SubscriberRc::new(ffi_sub),
Expand All @@ -57,10 +57,10 @@ impl<'a, T> SubscriberBuilder<'a, T> {
Ok((subscriber, SampleReceiverToken {}))
}

pub fn create_mt(mut self) -> Result<(mt::Subscriber<T>, SampleReceiverToken), IceOryxError> {
pub fn create_mt(mut self) -> Result<(mt::Subscriber<T>, SampleReceiverToken), IceoryxError> {
self.options.subscribe_on_create = true;
let ffi_sub = ffi::Subscriber::new(self.service, self.instance, self.event, &self.options)
.ok_or(IceOryxError::SubscriberCreationFailed)?;
.ok_or(IceoryxError::SubscriberCreationFailed)?;

let subscriber = mt::Subscriber {
ffi_sub: ffi::SubscriberArc::new(ffi_sub),
Expand All @@ -70,10 +70,10 @@ impl<'a, T> SubscriberBuilder<'a, T> {
Ok((subscriber, SampleReceiverToken {}))
}

pub fn create_without_subscribe(mut self) -> Result<InactiveSubscriber<T>, IceOryxError> {
pub fn create_without_subscribe(mut self) -> Result<InactiveSubscriber<T>, IceoryxError> {
self.options.subscribe_on_create = false;
let ffi_sub = ffi::Subscriber::new(self.service, self.instance, self.event, &self.options)
.ok_or(IceOryxError::SubscriberCreationFailed)?;
.ok_or(IceoryxError::SubscriberCreationFailed)?;

Ok(InactiveSubscriber {
ffi_sub,
Expand Down

0 comments on commit abe93b3

Please sign in to comment.