Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mutable borrow from immutable input(s) #150

Merged
merged 1 commit into from
Jun 26, 2019

Conversation

kpp
Copy link
Contributor

@kpp kpp commented Jun 20, 2019

For further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mut_from_ref

Clippy errors:

error: mutable borrow from immutable input(s)
   --> ocl/src/async/buffer_sink.rs:359:42
    |
359 |     pub unsafe fn as_mut_slice(&self) -> &mut [T] {
    |        

note: immutable borrow here
   --> ocl/src/async/buffer_sink.rs:359:32
    |
359 |     pub unsafe fn as_mut_slice(&self) -> &mut [T] {
    |                                ^^^^^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mut_from_ref


error: mutable borrow from immutable input(s)
   --> ocl/src/async/buffer_stream.rs:371:42
    |
371 |     pub unsafe fn as_mut_slice(&self) -> &mut [T] {
    |                                          ^^^^^^^^
    |

error: mutable borrow from immutable input(s)
  --> ocl/src/async/rw_vec.rs:68:42
   |
68 |     pub unsafe fn as_mut_slice(&self) -> &mut [T] {
   |                                          ^^^^^^^^
   |

@c0gent c0gent merged commit 24bd0bf into cogciprocate:master Jun 26, 2019
@kpp kpp deleted the mutable_borrow branch June 26, 2019 06:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants