# No method named "to\_le\_bytes" found for type "b256"

**URL:** <https://forum.fuel.network/t/no-method-named-to-le-bytes-found-for-type-b256/6445>\
**Category:** Sway\
**Created:** [August 12, 2024, 2:05am UTC](https://forum.fuel.network/t/no-method-named-to-le-bytes-found-for-type-b256/6445 "2024-08-12T02:05:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![xpluscal](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/xpluscal/32/3337_2.png) [@xpluscal](https://forum.fuel.network/u/xpluscal)\
**Post date:** [August 12, 2024, 2:05am UTC](https://forum.fuel.network/t/no-method-named-to-le-bytes-found-for-type-b256/6445/1 "2024-08-12T02:05:24Z")

</div>

According to docs this should be the way to convert b256 to byte array.

```auto
let recipient_bits:b256 = recipient.bits();
let mut recipient_bytes = recipient_bits.to_le_bytes();

```

Errors with:

```auto
No method named "to_le_bytes" found for type "b256"

```

Any idea why?

---

<div class="post-metadata">

**Author:** ![xpluscal](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/xpluscal/32/3337_2.png) [@xpluscal](https://forum.fuel.network/u/xpluscal)\
**Post date:** [August 12, 2024, 3:42am UTC](https://forum.fuel.network/t/no-method-named-to-le-bytes-found-for-type-b256/6445/2 "2024-08-12T03:42:58Z")

</div>

Found the culprit. For anyone looking, I was missing the import for array conversions:

```auto
use std::array_conversions::{b256::*,};

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex022/uploads/fuel/original/2X/5/57d5a345cc15a64b636e0d56e042857f8a0e80b1.png) [@system](https://forum.fuel.network/u/system)\
**Post date:** [September 1, 2024, 11:43pm UTC](https://forum.fuel.network/t/no-method-named-to-le-bytes-found-for-type-b256/6445/3 "2024-09-01T23:43:38Z")

</div>

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.
