Ah, one thouht, you may want to be more careful with the def'n of IterBytes
on MapKey to be sure that the hashcodes are the same.
Niko
On Sat, Jun 01, 2013 at 06:46:00AM -0400, Niko Matsakis wrote:
> OK, I finally got a chance to take a look. Indeed, this is not a bug,
> I just misunderstood wh
OK, I finally got a chance to take a look. Indeed, this is not a bug,
I just misunderstood what was going on. The problem is that the key is
`&'b [u8]` but you can't supply precisely that type, because the key
you are using to do th elookup has a shorter lifetime. This is true and
the type checker
Hi, sorry I haven't had a chance to look at this yet, I'll try to get
to it today!
Niko
On Thu, May 30, 2013 at 09:00:32AM -0500, Tommy M. McGuire wrote:
> On 05/30/2013 05:09 AM, Niko Matsakis wrote:
> > On Wed, May 29, 2013 at 04:55:31PM -0500, Tommy M. McGuire wrote:
> >> The problem is tha
On 05/30/2013 05:09 AM, Niko Matsakis wrote:
> On Wed, May 29, 2013 at 04:55:31PM -0500, Tommy M. McGuire wrote:
>> The problem is that I want to use a completely unrelated vector as the
>> argument to find() instead of an alias for part of the buffer or a pair
>> of indices into the buffer.
>>
>>
On Wed, May 29, 2013 at 04:55:31PM -0500, Tommy M. McGuire wrote:
> The problem is that I want to use a completely unrelated vector as the
> argument to find() instead of an alias for part of the buffer or a pair
> of indices into the buffer.
>
> Currently, with my quick change to incoming, the co
On 05/29/2013 04:55 AM, Niko Matsakis wrote:
> On Tue, May 28, 2013 at 01:48:55PM -0500, Tommy M. McGuire wrote:
>> The problem I am running into is that the type of the LinearMap's find()
>> method (Yes, this is 0.6.) is:
>>
>> fn find(&self, k: &&'b [u8]) -> Option<&'self &'b [u8]>
>>
>> In other
On Tue, May 28, 2013 at 01:48:55PM -0500, Tommy M. McGuire wrote:
> The problem I am running into is that the type of the LinearMap's find()
> method (Yes, this is 0.6.) is:
>
> fn find(&self, k: &&'b [u8]) -> Option<&'self &'b [u8]>
>
> In other words, the key argument is a borrowed pointer to a
I have a largeish buffer containing bytes that I would like to avoid
copying. The first thing I have to do with this buffer is parse it into
a hashmap structure. To that end, I have the following function:
fn line_map<'b>(buffer : &'b [u8]) -> ~LinearMap<&'b [u8],&'b [u8]> {...}
The problem I am